If you can’t remember your passcode when you try again, use a computer to put your iPhone in recovery mode. Recovery mode allows you to erase the iPhone, giving you access to set it up again. After you erase your iPhone, you can restore your data and settings from a backup. If you didn't back up your iPhone, you can set it up as a new device and then download any data that you have in iCloud.
Recover your passcode

Turn off your iPhone by holding both the side button and volume down button until the power off slider appears - drag the slider to turn off the iPhone and wait a minute to make sure it's completely off
Press and hold the side button while connecting the iPhone to the computer with a compatible lightning cable - meanwhile, do not let go of the button
Keep holding the button until a recovery mode screen appears on iPhone
Locate your iPhone in Finder
Choose Restore when you see the option to Restore or update
Wait for the process to finish - afterward, your iPhone will restart and show a setup screen
Disconnect your iPhone from the computer, then set up and use your iPhone
< BACK