Sorry, but it was a scam. You were presented with a advertisement, probably from an app you were using or a webpage, that was just looking to scare you, so you will buy a product to solve a problem that you do not have. Installing that app will not leave any lingering files that will infect your iPhone, so deleting is all that is needed to remove it. The scan it claimed to do is fake, an app is not capable of scanning your iPhone, and the malware it claimed to find was also fake. You will want to make sure you did not sign up for a subscription where you will see a recurring charge.
If there is a subscription that is managed by Apple from an in-app purchase, you will be able to cancel it here:
If you want to cancel a subscription from Apple - Apple Support
Some companies direct you to their website to offer a subscription so it is not managed by Apple and in that case, you need to cancel the subscription directly with that company.
You will also want to remove the other AntiVirus you installed. None of them will do any good and your iPhone does not need any AntiVirus software.