I don’t understand how you acquired these viri, except by downloading some files, or allowing a website to run a “scan”, which some of they try to do. It is to my knowledge not possible to catch a virus by merely looking at a site. And Avast is so good in that regard that it immediately warns you of suspected websites.
Yes, you can get stuff by just visiting a page from what I understand. Also, by clicking a x to close the window is a new trick with these things too. If you get a pop up, you are supposed to hit ctrl alt del, then shut that window down. If you click on the x instead, you’ve just started the destruction chain....
One thing for sure, the longer you try to fix it yourself, and restart, fiddle, the deeper hole you may be digging. In my case, if I’d just immediately called msft, the problem would have been solved much much faster, and I would not have gotten worked up enough to lose my marbles.