Here are steps:
1.Click the folder A- > Manage access-> Click Advanced.
2.Grant read permission level for user A.
3.For all subfolders and files except for subfolder B you want to restrict access for user A -> Manage access-> Click Advanced.
4.Click Stop Inheriting Permissions -> remove read permission for user A.
5.Result: subfolder B inherits the read permission of folder A and other subfolders and files under folder A will not be displayed to user A.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.