Honestly, you don't.... always obey the 'wild west' rules. You can take steps to minimize. I hover over the notice and in the lower left of the browser window, I have a readout of where the link goes. I inspect that for 'https' and logic (I.e., no links to Russia, Romania, etc.). I also rely on the developing security of my browser (Chrome v79) - others may choose Firefox or Opera - and on my several layers of 'real time' protection.
I would say that I skip connecting to a couple of funky sites each day. Your mileage may vary. Using a 'regular user' account (no admin privileges) is extra work, but recommended for explorers.
I bet there are others with even better ideas.