I’d wait until the pop-up shows 100 billion percent compromised, and no less than (32767) viruses found, three penguins, and a sheepdog. But seriously, your data is either compromised, or it is not. There’s no percentage on that.
And more importantly, web sites cannot scan your iPhone.
If web sites could perform a malware scan, they’d aso have access to rip off everything. Scans are deeply intrusive.
Installed apps can’t scan your iPhone contents, either.
The pop-up you saw is usually an advertisement for a shady add-on VPN app that isn’t even related to compromised data and viruses or other scare tactics the pop-ups claim. And the VPN apps tend to be good at collecting personally-identified network connection metadata. Not so good at privacy.
Ignore the pop-up, and get on with the rest of your day.
Recognize and avoid social engineering schemes including phishing messages, phony support calls, and other scams - Apple Support