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.
This is very helpful, thank you. I had a similar question on my mind for months about Java updates. Are they genuine? I was advised to visit the official Java website for updates or stop using Java. God bless you. Many thanks. Good reply.