How to hide some users to unlogged users [closed]

You haven’t posted any code so I won’t be able to precisely post an answer for you, but this it what you can do.

Find the page that is rendering the profiles, open it and add this piece of code in it:

<?php 
    $user_info = get_userdata($id);
    $role = $user_info->roles; 
    if ($role =='corporates' && !is_user_logged_in()) { 
        wp_safe_redirect( site_url()); 
        exit;
    } 
?>

Which $id is the user id of the profile owner, not the visitor.

If you add more technical information about your problem I will update the answer for you.