When was that? I've been using the web for as long as it has been publicly available (1993), and I remember ads were always a thing. Hell, it used to be a lot worse.
In the 90s there were endless popup ads that would block the entire page, and used javascript exploits to literally move around the screen to avoid your mouse, so that you couldn't hit the close button. Not even killing the process worked cause they would just come right back the moment you closed them.
And don't forget about those sneaky pop-under ads that you wouldn't even notice until you were about to close your browser for the day. It's the reason why I was an early adopter of the original AdBlock when it first launched back in 2002 (I use Ublock Orgin and NextDNS these days.)
Ads aren't nearly as obnoxiously today as they were back then. At least the close button works. And they don't open in a new window anymore cause pop-up blockers are included in every browser now and have been for about 2 decades. And thankfully browsers have also disabled the ability for javascript to control window position and size.