We apologize for the inconvenience. First, make sure your device is connected to the internet. If the button still does not work, restart your device and try again.
In rare cases, the problem persists even after that. If so, please reinstall the app using the method below, which keeps your data safe while reinstalling.
Open the Settings app, tap "General", then "iPhone Storage", select this app, and tap "Offload App".
This removes the app itself while keeping its data on your device.
Then search for this app on the App Store, install it again, and check whether the purchase button works.
Thank you.