How to assign a new registrant automatically to a group


I would like to know how to assign automatically
a new member of a group

If in my form I created
in choice fields:
type A
type B

Is it possible to assign a new user
automatically to a group

for example if during registration
the user chooses type A

How to assign it automatically
to group A?

Have a look at this topic: Custom Wizard Plugin 🧙.