First off in the 19th century defining a set list of styles wasn’t very easy since while people did brew a wide variety of beers trying to divide them into a set list of discrete styles can be a real nightmare. Also there were kinds of beer that could be found throughout the world at this time, notably 19th century porter (which tasted NOTHING like modern porter).
When you say “lager,” you probably mean beer that is pale, clear, not very strong, and with very little bitterness. That kind of beer became very prevalent in much of the world by the 1980’s but that’s just one kind of lager and the rise of lager started well before that style of beer became prevalent.
So what is lager? Lager means to cold age beer, but all sorts of beer can be aged in the cold. In America, (but often not elsewhere) lager means beer that’s fermented with Saccharomyces pastorianus yeast.
What is that yeast and why is it important? It seems to be a hybrid between normal yeast (Saccharomyces cerevisiae) and wild yeast that seems to come from Argentina (Saccharomyces eubayanus) and then this hybrid ended up in German beer cellars somehow. Although there are other differences (such as taste) the important thing that differentiates lager yeast is that it’s more cold tolerant than other yeasts.
Why would that matter? Well in the old days people didn’t isolate specific strains of yeast for brewing so they put the brewing yeast into the beer it would often be a mix of a wide variety of strains and even different species (such as the Brettanomyces genus of yeast which give beer a VERY distinct and to many people a deeply unpleasant taste) of yeast, as well as some bacteria if you weren’t really careful. This mix of strains could give the beer an unpredictable, unpleasant, or muddled flavor a lot of the time and it could be difficult to control.
Lager yeast helped with this. If you ferment lager at a lower temperature then the lager yeast can do its job but other kinds of yeast and bacteria will have a harder time propagating due to them not doing well in the cold. That gives you a more predictable and cleaner tasting beer. People liked that and lager slowly started to spread. This spread, however, was inhibited by people not knowing all of these facts about yeast strains and groping about in the dark a lot.
This spread was accelerated by the first isolation and propagation of a pure yeast strain in 1883 by the Carlsberg brewery in Denmark. This pure yeast strain was a lager strain and it spread very rapidly. Pure strains of other kinds of yeast came later but breweries were often resistant to their use (the traditional taste of a lot of British beers came from having blends of different kinds of yeast and a lot of traditional north German beers like Berliner weisse relied on bacteria for some of their flavor so switching over to pure yeast strains did happen eventually but there was more resistance to it than with lager brewing). Having a pure yeast strains and then cold fermentation (which would help if some wild yeast or bacteria got into the fermenting beer) helped a lot with quality control and gave lager a leg up.
However the kind of lager people were drinking during this period wasn’t anything like modern lager. It was dark, very flavorful, and fairly sweet. This sort of beer is called “dunkel” today but a lot of modern examples of dunkel are made differently, to find the more traditional stuff look for dunkel that’s deep red instead of black and has a strong malty sweetish flavor and zero burnt stout-style flavor.
These darker lagers had a lot of success in continental Europe. One thing that helped them was that the market for older styles of beer was often dominated (except in places like the UK) by smaller local breweries while the newer lager breweries were often newer and more industrial and could compete on economies of scale. However during this timer older beer styles still hung on and continued to dominate in many places.
Then pils started to spread. Pils is the ancestor of the kind of pale lager that dominates the world today and comes from what’s now Czechia (Pilsner Urquell, etc.). However, its spread started quite late with very little pils being made outside the Czech lands until the 1890s. The same applies to helles, which is a similar German style inspired by pils that wasn’t brewed at all until 1894.
Once it started spreading, pils (and similar styles of pale lager) expanded quite quickly out of the Czech lands. Some possible reasons why:
-Simple fashion, people didn’t want to drink the same beer as their fathers.
-The spread of glass cups made drinking a very clear beer attractive.
-Golden lager tends to taste its best when quite cold, older styles often not, so the invention of refrigeration helped with the spread of pale lager.
-Better malting techniques made it cheaper to brew with paler malts (in the past you generally got more alcohol out of a given weight of pale malt, but pale malt cost more, once pale malt stopped costing more it became more attractive economically).
-Depending on the styles you’re comparing, lagers often used less hops and before modern advances in hop breeding, getting enough hops could be expensive.
-Quality control issues being helped by brewing cold (see above).
-Most styles of pale lager have very little leftover carbohydrates in it compared to other styles of beer, which means it’s harder to spoil and is often more shelf stable, which makes it attractive to big international companies.
-The technical issues of setting up lager fermentation in your basement or in a garage brewery can be pretty challenging (which is why most microbreweries focus on ales) and light lagers often have such mild flavors that if you fuck up the brewing process even slightly you can taste it, while for an amateur making a small-scale batch, stout or pale ale is a lot more forgiving. This tended to lead to lager brewing being dominated by large industrial breweries in most countries which lead to economies of scale and lower prices.
So a lot of different contributing factors. For some specific countries:
The USA: traditionally hard cider was very popular in the US so there was less competition in the beer market when German immigrants moved in and started brewing significant amounts of lager. Also the temperance movement tended to be stronger among native-born Americans than among immigrants, which hurt the older styles of beer traditionally drank in America. During Prohibition a lot of the orchards of the kinds of apples favored for making hard cider were chopped down, which allowed lager to become that much more dominant after Prohibition. The rise of light beer after WW II also made making pale lager that much cheaper as the enzymes used to break down leftover carbohydrates and make the beer lighter also allowed you to get more alcohol out of a given amount of grain (light beer is basically watered down malt liquor, with malt liquor the enzymes break down carbs and provide more food for the yeast).
The UK: in the early 20th century, British beer was repeatedly hammered by austerity measures during the World Wars, the Great Depression and post-WW II austerity. This lead to crashes in the strength of British beer (with less hops used as well). Since alcohol is a preservative, these weaker beers often lead to problems with spoilage. This problem was compounded by the traditional cask system that was (and is) often used for ales which can lead to spoilage easier than with kegs if the bartender doesn’t know what they’re doing (or do things like pour people’s undrunk beer dregs back in the cast, which you can’t really do with a keg). Some British ales from this time period (Watney’s Red Barrel etc.) were infamous for often being off which lead people to buy more expensive bottled beer or lager (which is a bit harder to spoil or adulterate).
For a lot of other countries (like where I live in Korea), industrial pale lager beer was simply the first stuff on the market and was able to set up a stranglehold on the market by simply being the only beer people were familiar with, by keeping prices relatively slow due to economies of scale, and regulatory barriers to entry. For example, until quite recently the regulations for brewing beer in Korea and then distributing it to stores were so onerous it that was almost impossible for new breweries to compete with the two main breweries in the retail market.