This is a refined version of a feature that rolled out earlier this year. In the previous iteration, you could choose to allow anyone to add you to groups, or all your contacts, or no one at all. The new version lets you pick certain people who can add you to groups, that avoids people whom you don’t know well adding you to random groups. Here’s how it works:

Open WhatsApp on your phone, and go to Settings > Accounts > Privacy > Groups. Select “My contacts except for…” option. Add contacts whose groups you’re okay to join, to the list.

In countries like India, where WhatsApp is very popular, it’s common for people to add you to groups without permission. While an earlier version of these settings prevented strangers from adding you to rando groups, it’s quite possible you don’t know all the people in your contact list very well and don’t want to join all their groups.

— Safiyya Mansoor (@SafiyyaLM) March 26, 2019 This is a nice little feature to ensure you don’t have to be part of irrelevant groups.