If you have an active subscription, even a cancelled one, that has not yet expired, you cannot remove the payment method. You can add another payment method before removing the existing one, and it should then let you remove it.
check your subscriptions, click here ➜ If you want to cancel a subscription from Apple - Apple Support
If there is a subscription that has not expired yet but is already cancelled, then you will need to either wait until it expires, or ask Apple support directly to terminate it now.
click here ➜ Contact Apple Support