To allow users to join public groups right from the registration form, you need to enable that setting in the registration form’s settings via Users > Registration Forms > Edit > Settings
Then the groups will appear as checkboxes on the registration form which allows users to select which ones to join:
Get Started with the Best WordPress Membership Plugin Today
Connect, Manage and Build your Membership Site