It seems to me that you installed some kind of program that drew a chain reaction, which led to advertising and pop-up banners. See which programs have been installed recently and remove suspicious ones.
Then you should pay attention to special programs that are struggling with this kind of problems. Install ad blocker. https://adlock.com/adlock-for-windows/ Here you can download a quality ad blocker that will allow you to work better in the browser.