If for some reason you are unable to log in during setup, skip this step. You can always log in to your Apple Account after setup. When prompted to log in to your Apple Account in setup, select: Forgot password or don't have an Apple Account, and then select Set Up Later in Settings.
If your iPhone is frozen, you can do a forced restart, and then start the setup again.
To do a forced restart:
1. Press and quickly release the volume up button.
2. Press and quickly release the volume down button.
3. Press and hold the Power button, the phone will restart, release when you see the Apple Boot Logo.