Solutions to this problem:
Delete the payment method (card/phone number) and re-link it.
Re-login to your account on the device.
Reboot your device.
For more information, you can find solutions to this problem in the services in which you make a purchase.
Google Play: https://support.google.com/googleplay/answer/1267137
App Store: https://support.apple.com/en-us/HT203005