This article explains how to disable in-app purchases on your iPhone. Instructions apply to devices running iOS 12 and later.
How to disable in-app purchases
Many iPhone apps let you buy extra features, functionality, content, in-game add-ons or resources, or character upgrades. They let you do this from within the app, rather than going to a separate store, using in-app purchases.
The option of in-app purchases can be useful and fun (and it’s an important way for app developers to make money to keep making great apps), but useful and fun aren’t the first words that come to mind when you’re buying things without realizing it. If you do buy them without meaning to, you could be looking at a hefty bill from Apple.
This is especially a problem if your child is using your iOS device and is making huge amounts of in-app purchases without your knowledge.