How to Allow Different User Roles in Registration Form
If you want to select what role the registered user will play, you can do that easily from the Registration Form settings option.
Add a Registration Form

Go to wp-admin→User Frontend→Registration Forms. Here you need to create a registration form to your liking. We created a Registration 1 form for reference. If you need help for creating Registration Form you can see here.
Edit New User Role

After creating a registration form you need to go to Settings→General. There you will see an option to select New User Role. You can learn more about what each user role mean from here. Here we selected Editor.

Select the user role for the registration form and copy the shortcode. Then hit Save Form.
Add New Page

Now add a new page and paste the shortcode. Publish the page.

On the front end view if you now fill up the form as a user you will be registered as an Editor.
User Role
To see your registered user go to
wp-admin→Users→All Users.

You will be able to see your newly created user and their role.