Refer to this support article for various methods that you can use to resolve a forgotten passcode problem. --> If you forgot your iPhone, iPad, or Apple Vision Pro passcode, reset your device without a computer - Apple Support Which one you can use depends upon your equipment configuration. If you can use the iOS15.2+ method you may not need a computer. If you prefer to watch a video about this go to this web site https://www.youtube.com/watch?v=e0ULNMLj8sM
https://www.youtube.com/v=e0ULNMLj8sM
How to reset your device if you are running iOS 15.2 or later:
Advanced step: If you're using an eSIM on iOS 16 or earlier, contact your carrier before trying these steps and ask for a QR code to set up your eSIM again.
1. From your device's Lock Screen, try to enter your passcode five times until the "[Device] Unavailable" screen appears and your device asks you to try again later.
2. When you're able to, continue to enter your passcode until the "Security Lockout" screen appears and you get the Erase [Device] option in the bottom corner of the screen.
3. Tap Erase [Device], then tap Erase [Device] again to confirm.
4. Enter your Apple ID password to sign out of your Apple Account on your device.
5. Tap Erase [Device] to permanently delete all of your data and settings.
6. When your device restarts, follow the onscreen instructions to set up your device again, restore your data and settings from a backup, and set a new passcode.