What happens when you fail all 10 attempts for the restriction code
See the Apple Support article(s) below.
Screen Time passcode reset
If necessary, you will need to restore the device to factory settings. Do not restore from a backup made when the Screen Time code was active.
Restore to Factory setting.