Except for the hundreds of US cities that had trolley networks well into the 20th century. Millions of people got around US (often surprisingly small) cities on trolleys to and beyond WW1. The car alone had to be actively nurtured and trolley systems neglected for the car to win.
Precisely.
A big part of train ridership relies on people "living where they work". Even in low density countries like the u.s. and Russia rail was still successful because everyone in a certain town size or higher usually had a rail station a mile or less from their house.
Cities in the u.s. eventually got too big for this, so the "live where you work" radius was greatly expanded first through streetcars, and when certain cities got big enough, full on passenger rail service lines in the cities themselves (metros/subways, in nyc and to a lesser extent Chicago, Philadelphia, and Boston).
Cars changed the picture. Now people who owned one didn't have to live within a mile or so of a train station or their job. This meant that land outside of rail lines was suddenly very valuable, as it could be developed into big homes for rich car owners and sold at a profit, whetheras previously, no one could live there without transportation to their work.
This wasn't the end for rail, however. America, Japan and Europe all reached this stage and went different ways. America largely gave up on rail, Japan kept expanding their network without many hiccups, and Europe was in-between.
In America though, the car really caught the public's imagination. Once It was cheap enough it became a fad that continues to this day. "Why go on a boring train commute when you have the personal freedom inducing ultra cool automobile?".
More and more people bought them and quickly the car began to be seen not as the exception (as in japan) but the norm. Even before highways cut through and devastated inner cities cars and their owners reshaped our cities to their wants and needs, to the EXTREME detriment of rail. Cars did this so fast that by the late 1920s the vast majority of new development was pretty close to the suburban hell that we wrongfully see as the norm.
As this development was extremely low density, it could not support rail development, and this is when America stopped extending it's railroads. Another big reason is that trains began to be seen as ''lower class" and suburbanites didn't want to be associated with the blacks and eastern Europeans that still walked or took the train. The roots of white flight and the decline of americaa cities were sown a generation before it actually happened.
Thus what is now the norm in America is the cancerous sprawling suburbs that are completely and totally unsustainable without everyone and their mother owning a car. I'll give props, Canada handled it better than we did but their suburbia is just less hell, not full hell.
So how to stop this? Prevent America from reshaping around the car. This is both easier and harder to do than it sounds. As early as the great depression the new deal heavily shafted rail in favor of cars, (to name just one example
the subway's expansion in new York grounded to halt while billions of federal money was spent to construct auto-only Bridges and tunnels across the Hudson. If even some of that money was given to the subway, I bet jersey city, Hoboken, Staten island would be fully integrated into the subway system.
Frankly it astonishes me why American commuter rail roads didn't try to ensure that areas within a mile of their stations were optimized for rail usages (blocks of dense apartments and townhouses organized to have just a 10-15 minute walk from the station). Nothing prevented them from subsidizing developers.
Japan did this, and it worked wonders.
Even in their hayday America wasn't dependent on trains in the way that we now are on cars. Keep cars affordable only to the high upper middle class and the rich and the downward spiral of car domination can by largely prevented, as cities will have grown large (and more importantly, dense) enough that metros, streetcars, and commuter rail are more convent in most cities than driving. You can see this in new York today (subway, path, lirr, metro North, HB light rail, Staten island rail), parts of Europe, and most of Japan)