These worlds were soon joined by others – there was Earth-3, an evil mirror universe where all "our" superheroes had supervillainous counterparts and Lex Luthor was the only superhero, Earth X (originally intended as Earth [swastika] before a last-minute change) where the Nazis had won and the superheroes were fighting in an ongoing resistance... and when DC bought up other companies, like Charlton Comics or the characters from Fawcett Comics' Captain Marvel line, their stories were claimed to have occurred on other earths in the multiverse too.
This also allowed DC to do stories that they could never do with the main versions of the characters – Superman could get married, or Batman die, and it would be the "real" Superman or Batman, in fact the original ones who had been in the very first stories about those characters, but it would still not disrupt the status of the characters in their own comics.
And this state of affairs lasted for about twenty years, until DC made the mistake so many entertainment companies make. They started listening to the complaints of fans.
While there are a few not-unexpected wokeisms, this blog post presents a good overview of Crisis on Infinite Earths, the twelve issue "maxiseries" from 1985-86 that DC used to wrap up their multiverse and start what they hoped would be a cohesive new single universe. That includes an explanation of why there was a multiverse in the first place, which is an interesting chain of events in itself.
In a way, Crisis marked a fall from grace, the beginning of the end despite it's being a good comic story in itself. This has little to do with the presence or absence of multiple universes. As Hickey notes, DC would eventually bring back the idea of the Multiverse. Marvel would, in time, openly start doing multiverse stories as well. It's a durable concept.
No, the problem is that it taught both major comics companies that permacrisis was the way to go. If you could draw in new readers―or at least maximize the readership you already have―by doing an extended crossover that Will Change Everything, then there's no reason to not be doing that all the time. Or at least that seems to be the thinking of editors and publishers. The result is that eventually, pretty much no one is allowed to tell any other kind of story. Which can get pretty wearing after a while.