If the app was free to download you wouldn't have to pay for it.
But if you have created a subscription when you opened the app - then you must cancel that subscription immediately. If you have already paid, you can request a refund.
To cancel a subscription, go to:
Settings → Apple ID → Subscriptions
Select the subscription you would like to cancel, tap in and select "Cancel Subscription" If you don't see the app under subscriptions, then no subscription has been created for the app and you don't need to do anything else.
You can request a refund here:
https://reportaproblem.apple.com