Screen Time comes with settings to help prevent unintentional or unauthorized purchases from the App Store and other Apple services. You also can require a password for purchases, prevent certain types of purchases, or turn off purchasing completely.
To prevent Apple In-App Purchases, you need to turn on Screen Time first.
When Screen Time is enabled, open the Settings app, then tap Screen Time.
Tap Apps & Websites, then tap App Store.
Tap In-app Purchases and select Blocked.
You can also require a password for future purchases from the App Store.
If children in your Family Sharing group have their own devices, use Ask to Buy to review and approve their purchase requests.
If you let children use your device, you can require a password for every purchase.