If you have forgotten the ScreenTime passcode, the procedures outlined within this link should resolve the problem:
If you forgot your Screen Time passcode - Apple Support
If your iPad is capable of supporting iPadOS 13.x or later, you should update to the most current version before attempting to resolve a forgotten ScreenTime passcode. The most recent iPadOS updates have introduced a mechanism whereby a forgotten ScreenTime passcode can be reset, using an AppleID, without wiping the iPad.
To reset a forgotten ScreenTime passcode on older versions of iOS/iPadOS, the iPad must be complete reset “as new”, losing all locally stored data:
Settings > General > Reset > Erase All Content & Settings
In this situation, you’ll not be able to restore your data from an iCloud or iTunes backup - as the forgotten passcode is integral to the backup.
Be aware that the ScreenTime Passcode reset, where available, may be associated with a completely different AppleID account…
By design, when activating/setting the ScreenTime Passcode, you can use any valid AppleID credentials - and only this credential can be used to reset a forgotten ScreenTime Password. As such, by example, a parent may choose to use their own (or other parents) AppleID - which may differ from that used, by the device, for iCloud services.
You can only reset the ScreenTime Passcode with the same AppleID that was used when the Passcode was activated.