If you see a pop-up claiming your computer has a virus or urging you to call a support number, This is "scareware." Simply force-quit Safari (or close the tab) to escape the loop.
In the Security tab, you can also enable "Warn when visiting a fraudulent website" to further enhance browsing safety. Pop-Up Blocking on iPhone & iPad pop up blocker on safari
Pop-ups can be ads, notices, offers, or alerts that open in your current browser window, in a new window, or in another tab. Some ... Show all Tool Best For Key Advantage Magic Lasso Apple Enthusiasts Native design that feels like part of macOS/iOS; blocks YouTube ads. 1Blocker Advanced Users Extensive customization and iCloud sync across devices. Wipr 2 Minimalists "Set-it-and-forget-it" tool with a one-time low cost and no complex menus. AdGuard Heavy Browsing Highly effective at removing cookie notices and trackers alongside pop-ups. Verdict The built-in Safari pop-up blocker is If you see a pop-up claiming your computer
However, you might need to toggle these settings if: in a new window
"Why am I still seeing pop-ups?"