From your description, it is unclear whether you have an issue with the device passcode (used to lock the iPad) - or if you refer to your ScreenTime passcode.
If you are having difficulties remembering your device passcode (this being the passcode that you use to “unlock” and use the iPad), or your iPad is disabled, you’ll need to follow this procedure:
https://support.apple.com/en-gb/HT204306
If instead you have forgotten your ScreenTime passcode (previously known as the Restrictions passcode), then this may be reset from the iPad if you are running iPadOS 13.4 or later:
https://support.apple.com/en-us/HT211021
I hope this information is helpful in resolving your issue.