Are you able to follow this procedure to properly prepare the iPad for disposal/reuse?
What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support
This process will fully erase/reset the iPad.
Otherwise, as described, your iPad is either prompting for a ScreenTime/Restrictions Passcode - or the device is in state that requires entry of the device (lock) Passcode.
ScreenTime Passcode
If the ScreenTime passcode is unknown, 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 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.
Device (Lock) Passcode
You may find this support page to be helpful:
If you see an iPhone or iPad unavailable message or Security Lockout screen - Apple Support
A forgotten or unknown iPad passcode cannot be recovered - and neither can it be reset or modified from another device.
iPadOS 15.2 or later with a forgotten Passcode
Apple has introduced a procedure with which to reset an iPad or iPhone with a forgotten Passcode - allowing you to use your AppleID and associated Password to reset your device.
How to reset your iPhone, iPad, or iPod touch when you forgot your passcode - Apple Support
You will be able to restore data from a pre-existing iCloud backup without the use of a computer, but will require a PC/Mac to restore data from an iTunes backup.
iPadOS 15.1 and earlier - and all devices that are Disabled
If your iPad is disabled/unavailable/locked-out, or you have forgotten your iPad passcode, you have no alternative other than to follow this process:
If you’ve forgotten the passcode on your iPad, or your iPad is disabled – Apple Support
You’ll need access to either a Windows PC (with iTunes for Windows installed) or a Mac (with iTunes or Finder - as appropriate for the installed version of macOS).
Download and use iTunes for Windows – Apple Support
Update to the latest version of iTunes – Apple Support
Use of a PC or Mac is unavoidable. If you don’t have access to a suitable computer of your own, that of a helpful friend or family member will suffice. Alternatively, the technicians at the Genius Bar of your local Apple Store will be delighted to assist:
Genius Bar Reservation and Apple Support Options - Apple
You may also need your AppleID and associated password. If these have also been forgotten, they can be recovered here:
https://iforgot.apple.com
To recover your credentials, you’ll need access to one of the following:
- Your primary email address mailbox that corresponds with your AppleID
- Any of the secondary/recovery email addresses that should be configured for your AppleID account
- Any of the trusted telephone numbers (fixed line or Cellular/Mobile) that are associated with your AppleID
More information about recovery of your AppleID and associated Password can be found here:
If you forgot your Apple ID - Apple Support
If you forgot your Apple ID password - Apple Support