Disallow some websites from opening new tabs/windows In Safari how can I stop certain websites from being allowed to open new tabs and windows?

On some ad-heavy sites I click anywhere on the page and it spawns two or more new tabs trying to sell me some scam.

Can I stop this from happening?
The best built-in defence for this is Safari Preferences → Security → Block pop-up windows. Other than this, you can use an adblock such as uBlock Origin.