You won't be able to remove a credit or debit card from your account if it's being used as your primary or backup form of payment.
For a primary form of payment
Your account must have a primary form of payment. This means that if you'd like to remove a credit card that currently serves as your primary form of payment, you'll need to assign a different form of payment to be your primary one. This process might require you to add a new form of payment to your account, so that you have something else to assign as primary.
Assigning a different primary form of payment for your account will unassign the card you'd like to remove. You'll then be able to remove your card.
For a backup form of payment
You'll first need to unassign your card from being used as your backup form of payment. You'll then be able to remove your card. Learn how to unassign and remove an existing form of payment.