to display Groups on registration page

how do i display groups on registration page, so my users can select a group and they get automatically added to that group, so after registration, they see that they are already in the group chosen from when they where registering

will appreciate it if there is some form of code to do this.. and where to place the code

You will need to write the code! this isn’t something that exists as far as I’m aware i.e as a plugin addition, and I’m not even sure it’s possible as you’re asking for a member to be added to a group before that account has been activated, that and other issues may make this quite hard or impossible to do.