How to hide custom fields on the registration form?
You can configure the registration form in "Manage form display" of the "Account settings":

/admin/config/people/accounts/form-display

Go to the bottom of this page and in "Custom Display Settings" enable the use of custom display settings for the "Register" form.

Then you get a tab "Register" at the top of the page. Here you can configure which fields are displayed.