Is your phone part of Family sharing?
...
How to reset the Screen Time passcode for your child's device
If you’re using Family Sharing to manage a child’s account, passcode reset options won’t be available on their device. Use the following steps on the family organizer's device to reset the Screen Time passcode for your child.
On an iPhone, iPad, or iPod touch
- Make sure that the family organizer's device is updated to iOS 13.4 or iPadOS 13.4 or later.
- On the family organizer's device, go to Settings > Screen Time.
- Scroll down and choose a child’s name under Family.
- Tap Change Screen Time Passcode, then tap Change Screen Time Passcode again. You might be asked to authenticate with Face ID, Touch ID, or your device passcode.
- Enter a new Screen Time passcode, then enter it again to confirm.
...
copied from: If you forgot your Screen Time passcode - Apple Support
Try to connect in recovery mode to your computer and restore it to factory settings, as explained in this article:
If you can't update or restore your iPhone or iPod touch - Apple Support