There is a built-in tool, but Safari extensions are better This article explains how to block ads in Safari on iPhones using content blockers. Your phone must have iOS 9 or higher to use content ...
You can block pop-ups on an iPad in just a few steps. Here's how to do it in the Safari section of your Settings app.
To block pop-ups on a Samsung Galaxy S10, you'll need to open your web browser's settings menu, or delete malicious apps.