MohdKhan can you describe your setup and issue in more details?
Which permission are you referring to? There's no option to prevent accessing profiles. "View user list" only controls who can search for users using Flarum's search bar, mentions or REST API.
The only way to prevent accessing profiles without any extension is to make the whole forum private with "View discussions" set to members. We don't support having public discussions but private profiles out of the box.