Install and open the latest version of Finder on Mac or iTunes on Windows
Connect the iPhone to the computer with a USB cable
Put the iPhone into Recovery Mode
Wait for the computer to detect the iPhone in recovery mode
Select Restore when prompted
Confirm the restore action
Wait for the computer to erase and reinstall iOS
Keep the iPhone connected until the process finishes
Set up the iPhone after it restarts
