Thanks, those are advertisements and "news" sites are by far the worst offenders.
Advertisements aren't pop-ups per se. What you really want is a content blocker or "ad-blocker". I prefer Safari too, but Apple takes a hands-off approach to attempting to block them within the app. If Apple were to include them natively it would cause advertisers to complain Apple is taking their business away. In fact certain companies have been complaining loudly about Apple doing exactly that by incorporating certain Safari features that limit tracking and other ways of spying on you. Apple is more concerned about privacy than annoying advertisements.
Ad-blocking Safari extensions are popular but I don't have anything in particular to suggest. None of them are completely effective and all of them have the potential to cause unwanted behavior.
With the understanding that Safari is preferable in many respects, if you want to avoid intrusive advertisements on sites known to be laden with them, consider using Brave: https://brave.com
Brave incorporates a native ad-blocker in addition to other privacy features. I have not compared it to Firefox in that respect, so am not in a position to judge whether one is better than another.