A pending purchase cannot be cancelled. You will have to wait until the charge is able to be processed and then try requesting a refund.
Request a refund for apps or content that you bought from Apple - Apple Support
If there is some trouble on the payment method used and it is unable to be finalized after a couple of days, then that payment method is no longer considered valid and you will have to add a different valid payment method in order to continue to use the App Store. You will not be able to use the App Store if there is money owed on your account.
If you want to prevent purchases when you allow someone else to use your device, then you will have to take additional steps, such as Screen Time restrictions preventing in app purchases or requiring a password for the purchase that your relative does not know.