To set in-app purchase restrictions:
  1. Open the Settings app and visit Screen Time. Enable Screen Time if you haven’t already done so, then tap Content & Privacy Restrictions. 
  2. Tap the switch next to Content & Privacy Restrictions to enable the options below.
  3. Tap iTunes & App Store Purchases.

On Apple devices, you have two options to restrict in-app purchases: always require a password for in-app purchases or disallow in-app purchases entirely.

To disable in-app purchases entirely, tap In-app Purchases and select Don’t Allow. To require a password for in-app purchases, select Always Require under REQUIRE PASSWORD.

Visit Apple Support for more information on enabling purchasing restrictions. Parents can also use the Ask to Buy feature to limit their children’s access to purchasing.