You can use Screen Time to prevent unintentional or unauthorized purchases from the App Store and other Apple services. You can require a password for purchases, prevent certain types of purchases, or disable purchasing completely.
How to use Screen Time to disable in-app purchases
To turn on Screen Time, go to Settings > Screen Time, then tap Turn on Screen Time. If you already use Screen Time, skip to step 3.
Tap Continue, then choose "This is My [device]" or "This is My Child's [device]."
If you're the parent or guardian of your device and want to prevent another family member from changing your settings, tap Use Screen Time Passcode to create a passcode, then re-enter the passcode to confirm. After you confirm your passcode, enter your Apple ID and password. This can be used to reset your Screen Time passcode if you forget it.
If you're setting up Screen Time on your child's device, follow the prompts until you get to Parent Passcode and enter a passcode. Re-enter the passcode to confirm. After you confirm your passcode, enter your Apple ID and password. This can be used to reset your Screen Time passcode if you forget it. Make sure to choose a passcode that's different from the passcode you use to unlock your device. Learn what to do if you forget your Screen Time passcode.
Tap Content & Privacy Restrictions. If asked, enter your passcode, then turn on Content & Privacy Restrictions.
Tap iTunes & App Store Purchases.
Tap In-app Purchases and set to Don't Allow.
Other ways to control purchases on an Apple device
If children in your Family Sharing group have their own devices, use Ask to Buy to screen and approve their purchase requests.