You can securely erase your personal information, content, and settings (such as privacy and network settings) from your iPad. When you erase your iPad, it’s restored to factory settings. If you want to reset your iPad settings but keep your personal content, see > General > Transfer or Reset iPad.
Tap Erase All Content and Settings.
If asked, enter your iPad passcode or Apple Account password.
Tap Continue to confirm.
If you have an eSIM, you can choose to erase your eSIM or keep it. If you erase your eSIM, you need to contact your carrier to reactivate your cellular plan.
Connect your iPad to your computer with a USB or USB-C cable.
On your Mac, click Apple Support Article: How to erase the eSIM on your iPhone or iPad