Current public transport is like transport belts in Factorio. Fixed routes. This works ok in a simple old-fashioned economy (a few large employers, large hubs where everyone goes to the same place).
What we need is a more flexible, on-demand model of public transport. Something like logistic bots in Factorio. Lots of small people-movers which go direct from point to point, on demand. Buses and trains were already obsoleted by cars and can only survive by targeted anti-car policy.
Some kind of taxi (which would need to be automated to be at all economical for regular use) or electric scooter hire is the next stage of evolution.
Logistic bots do require a lot of energy, but that's the nature of progress.