The Greeks built the first railroad about 350 BC. They used it transport ships across an isthmus.
The Civil War saw a dramatic explosion of railroad building. Completion of the first continental railroad in 1869 enabled producers to move products and people quickly and economically from East to West and North to South in America.
However, the golden age of passenger rail travel was the 1920-1950 period. Passenger rail was all but finished by the Interstate Highway System and the post-WW2 expansion of air travel.
Railroads do have a purpose as economic freight transports. As people movers, they suck — unless your distances are relatively short. Railroads are capital intensive businesses and they are burdened by both unions AND lots of government regulations that add unjustified costs. Capital intensiveness, union workers, minuscule ridership, and arcane regulations all argue against high speed rail success.
I didn’t know that about the Greeks. How were they powered, oxen?