You are only charged for what you agreed to by double clicking the side button with the amount and terms on the screen, followed by verification with FaceID/TouchID or Passcode. You are responsible for those charges and they do not magically go away because you do not have the money on your card to pay for them.
When you start a free trial, you must cancel at least a day before the trial ends to avoid the subscription charge. That is stated on the Authorization Screen that you must double click the side button to accept.
You will not be able to use the App Store at all for any purpose while you owe money from a previous purchase. If you clearly did not have the money for a purchase then you should not agree to the charge. You will continually see the attempt to charge you until it has been paid. You can get more information about resolving that here:
If a message says 'billing problem with previous purchase' or 'verification required' - Apple Support