The kind of city city-fans like - walkable, dense, with tall buildings, and focus on trains and bikes as opposed to cars - doesn't have much space for factories and the trucks that bring cargo to and from them.
I live in a village by a major road. On the other side of the road there is a cluster of factories. Half of the village works there, together with ppl from other nearby villages.
Goods coming in and out by truck, not rail? Where I live in the USA, all the older factories have rail spurs that run to them. In many cases these are now abandoned, and everything goes by truck. So we have giant warehouses lining the motorways, and giant traffic jams to go with them. That is a choice that can be reversed.
Real-world dense, walkable cities generally have industrial districts folded into them.
I once asked a railfan why nobody here transports goods by rail anymore, and the only answer I got was "it's complicated, there's a whole book written on it". Anyway I imagine arranging a time window for a cargo train is more complocated and less flexible than just hiring a truck. Kinda like TCP/IP vs OSI stack.
To an extent that's so, but the bigger problem is simply that truckers don't have to pay to maintain the roads, even though it's well known that they cause very high maintenance-of-way costs.
Railroads have much lower fuel & labour costs, but large capital & upkeep charges. So under profit pressure, they tend to under-invest, degrading on-time performance. Friends of mine see this in action across from their house every day, on a formerly double-track main line.
What do you mean "dream"? Eureka Springs, Arkansas, in the Ozark Mountains, had an electric street railway in 1905, and its population wasn't more than a couple of thousand. In fact at that time there was a project in the works to connect it with a nearby town, which was only practicable at all because electrics can handle very severe grades.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!