Sign in to your Apple ID account page and edit your Apple ID details.
https://appleid.apple.com
On the Sidebar click Payment methods -> then tap Payments Methods and tap Manage payment method.
From your iPhone
Go to Settings -> your profile -> scroll to Payment and shipping -> tap on it.
You can add / edit a payment method.
See the following Apple articles:
Change, add or remove Apple ID payment methods
Change, add or remove Apple ID payment methods – Apple Support (UK)
Add money to your Apple ID balance
Add money to your Apple ID balance – Apple Support (UK)
Payment methods you can use with your Apple ID
Payment methods you can use with your Apple ID – Apple Support (UK)