Do you really mean the User Profile page? I thought you must mean making changes to the "People" page.
You control which groups appear in the drop-down Filter list on the "People" page through the Permissions screen.
Options > Users > Change Permissions > Show_group_members
Just clear the check mark in that row for any group you do not want listed on the "People" page.
What circumstances do you have in mind that makes you want to hide this information. It would be awkward for you when editing a user's groups if it was not visible.
However, I believe the macro you want is: list_current_groups
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.