Please follow these steps:
1- Go to your device settings.
2- Click on screen time.
3- Go to the content & privacy restrictions.
4- Click on the Purchases method from the App Store & iTunes.
5- Click on in-app purchases
6- Click Allow to activate the purchase.