If you enter the wrong passcode on your iPhone Lock Screen too many times, an alert lets you know that your iPhone is disabled. (Learn what to do if you see "[Device] unavailable" or "Security Lockout" on your iPhone or iPad.)
Lock Screen Passcode or Screen Time Passcode.
Following this process is the only way out if your iPhone is disabled. The steps given in this link will help you reset the passcode -> If you forgot the passcode for your iPhone, iPad, or iPod touch, or your ...
Note: If you have forgotten the Screen Time Passcode then restoring your device from a backup after the passcode reset will return the Passcode back to your device. So, please do not restore from a backup.