If you want your group memberships to be known only by the group members, use Signal.
Or P2P stuff like Briar :)
Or Matrix (warning some assembly required)
WhatsApp isn’t the only messenger lacking cryptographic assurances for new group members. In 2022, a team that included some of the same researchers that analyzed WhatsApp found that Matrix—an open source and proprietary platform for chat and collaboration clients and servers—also provided no cryptographic means for ensuring only authorized members join a group. The Telegram messenger, meanwhile, offers no end-to-end encryption for group messages, making the app among the weakest for ensuring the confidentiality of group messages.
That study was 3 years ago, features to create private (invite only) group chats are supported now.
Duh, how else is Zuckerberg going to spy on you and sell your data back to you?