They are SCAMs, trying to either separate you from your money, or scare you into installing software they point you at. They either get paid to market the software or the software will do something that makes them money.
You did the smart thing and asked in these forums.
If if they are coming from your web browser, then it is impossible for any webpage to look inside your computer. All web browsers are sandboxed. This just means the operating system isolates the app so it is limited in what it can look at, especially the stuff that would tell it you had a virus or other malware.
Then considering there is no self-propagating viruses for the Mac, and you know it is a SCAM.
There is adware that that you have to be tricked into installing, but MalwareBytes is very good at removing that. And since you have to be tricked into doing the install, you only need to run MalwareBytes AFTER an install, not all the time.