Hi Anoshnea,
If the restrictions passcode is forgotten, you will need to restore the iPad to factory settings to remove that. The steps below show how you would do that:
"Put your iPad in recovery mode and set it up again
- Make sure that your Mac is up to date. If you're using iTunes, make sure you have the latest version of iTunes.
- On a Mac with macOS Catalina, open Finder. On a Mac with macOS Mojave or earlier, or on a PC, open iTunes. If iTunes is already open, close it, then open it again. Find out which macOS your Mac is using.
- Keep your iPad connected and wait until the recovery mode screen appears:
- For an iPad without a Home button: Press and quickly release the volume button closest to the top button. Press and quickly release the volume button farthest from the top button. Press and hold the top button.
- For an iPad with a Home button: Press and hold both the Home and the top (or side) buttons at the same time.
4. Keep holding the button (or buttons) until you see the recovery mode screen
5. Locate your iPad on your computer. When you see the option to Restore or Update, choose Update. Your computer will try to reinstall the software without erasing your data. Wait while your computer downloads the software for your iPad. If the download takes more than 15 minutes and your iPad exits the recovery mode screen, let the download finish, then repeat step 3.
6. After the Update or Restore completes, set up your iPad."
You can skip the last step since you are wanting to give the iPad to someone else. Those steps are from this article: If you can't update or restore your iPad - Apple Support
We hope that helps.
Take care!