priyanka123 can you give more details? Maybe with a mockup?
If you are adding content to the user's profile page, you have access to the user
property so you should be able to make decisions based on the groups.
If what you're trying to do is not a UI change but an access restriction, this would be handled through policies on the PHP side.