How to get past a forgotten iPhone passcode?

Solution 1:

Connect the device to a Mac over USB and restore it using Finder. Since you have control of the AppleID that locks that device, you only need to get it connected to a network again. You can also see the last backup date online and know how much data might be lost in a restore.

Once the restore process is complete, you can restore the backup or just set up the phone as new. The apps, data, passcode will all be erased.

Solution 2:

If the iPhone has ever been connected to internet on WiFi, go to the same place. It will connect again and erase.

If it has a SIM card and a valid cell contract with data, and you had not turned off cell data, it will connect and erase as soon as it gets a reasonable cell signal.

If none of those, connecting to a MacOS device and setting it up as new will erase non-default apps and data. You can then login with your Apple ID and download any apps you’ve added from the App Store and any data that had been in iCloud. Data that was only local will be gone.