It is not clear what glitch you are referring to. You said you installed the app from the App Store, and that requires you to double click the side button with the price on the screen, followed by authentication with Face ID/Touch ID or Passcode. It does not ask for a payment method, the payment method used for App Store purchases are billed to your Apple Account and that is what you are authorizing by double clicking the Side Button.
Without the funds or valid card to pay for the amount you owe, it will remain Pending until you are able to complete that purchase and you will not be able to use the App Store for any other purpose until then.
There is no such thing as removing a Pending charge, all you can do is pay for the amount you had authorized by double clicking the side button and authenticating with Face ID/Touch ID or Passcode, and then you can attempt to request a refund. In most cases all transactions are final due to that explicit action needed to authorize a purchase, but at times Apple will provide a compassionate refund.
Request a refund for apps or content that you bought from Apple - Apple Support
To review the payment methods you have on your account and add a valid payment method to pay for your authorized purchases, this support article may be helpful.
Add a payment method to your Apple Account - Apple Support