If you did not set the Screen Time Passcode, then someone that knows the Passcode to your device did it. That is not something that will set on its own. When a Screen Time Passcode is set up, you have the option to use an Apple Account/Password in case you forget it. If you skip that option, there is a final message that says if you do not use the Apple Account/Password in case you forget the Screen Time Passcode that you will not be able to securely reset the Screen Time Passcode. Try your Apple Account/Password and if that does not work then another one could have been used, and your only option is to set your iPad up as new. You will not be able to restore from a backup as that will just restore the Screen Time Passcode too.
Follow the steps here for other options such as if your device is part of a Family Sharing plan where the Organizer can reset the Screen Time Passcode on your device.
If you forgot your Screen Time passcode - Apple Support