Hello delphiene,
Whenever you see a pop up warning that warns you about having these "viruses" on your iPhone, it is actually the complete opposite. As long as you didn't interact with the pop up (tapping the fake close button or tapping the "remove viruses" button) and you closed out the tab then you should be fine and there is no reason to be concerned if you didn't interact. If you did interact then you should be concerned. It is a scam and you should not interact with it under any circumstances. Websites cannot detect viruses on your iPhone, the only way this could have happened was if you used a legitimate virus scanner.
I hope this helped you out, cheers