Did my iPhone 7 Plus get a virus?

I was just roaming around through safari on this specific page about psychology and out of no where it says my phone has been infected and it said something using a specific app to scan my phone. I got extremely worried. So is my iPhone infected or not? I'm very scared right now.

Cool

No. Lookup what scareware is.
It's a common tactic to get people to believe that their device is infected. It is very difficult (but not impossible) to get a virus/malware on an iOS device.

Generally speaking, you're more likely to see these kinds of pages if you're on shady websites and/or the webpage you're on has weird ads.

Clear Safari's history and cache and things should be fine.

No.

Its just scareware. To get you to download something you don't need.

Nothing to worry, it's just adware. Don't click on anything to download the suggested app. Go to Settings > Safari > Clear History and Website Data > Clear History and Data. That's it, your Safari is clean again.