See the Apple Support article(s) below for IOS 15.2 or later..
Passcode - How to reset your iPhone, iPad, or iPod touch when you forgot your passcode (IOS 15.2 or later). *
ASC YouTube for how to restore your iPhone if you forgot your passcode - Apple Support. -
See the Apple Support article(s) below for earlier than IOS 15.2 .
Passcode - If you forgot the passcode for your iPhone or your device is disabled. *
See if you can recover the ID/password. An iCloud e-mail address is an Apple ID. Use every email address you can think of.
Apple ID - How to find your Apple -
Apple ID - Find -
Other ways to find your Apple ID
You can check to see if you're signed in to the App Store, FaceTime, or Messages on your iPhone, iPad, iPod touch, or Mac, or check to see if you're signed in to iTunes for Windows on a PC. You can also go to iCloud.com or appleid.apple.com and see if your Apple ID prefills on the sign-in screen.
If you forgot the Apple ID (iCloud) password, enter the Apple (iCloud) ID, and click Forgot Password. See if you can get a Rescue or Notification email option if necessary. Link to contact Apple Support at the end of the 2nd article.
Apple ID - Manage
Apple ID – Forgot Password *