In the case of the US I think you mean Amtrak is nationalized? But that’s passenger rail. The us has a private freight rail system, which is from what I understand, is one of the best in the world.
Writings I've seen basically say transportation systems fail under the free market eventually.
They just have lots and lots of old infrastructure that they can use and they don't need to share their rail with passenger travel, and their only responsibility is making a profit so they can cut anything away that isn't profitable.
Of course that then just leads to more traffic and trucks on the road. So far worse for the nation as a whole.