Rail is hugely inflexible.
The network of main lines and stations date back to Victorian times, modified by Beeching (amongst others) who closed lines with low volume use. Few new routes in the last 100 years.
Stations are not in the right place - firmly rooted in city centre locations. Establishing freight transfer and road access for local delivery would be costly (at best). Some met particular industrial needs which have long since vanished - eg: coal mining, agriculture, steel, potteries etc.
Simplistically new or extended rail lines should be no more difficult than a major road - but roads can accommodate steeper gradients, sharper bends, and include roundabouts and traffic lights to control intersections. Major rail needs costly bridges or tunnels.
Rail carries only trains on fixed lines. Users have to travel to departure points. On arrival at the destination, further travel to their journey end (walk, bus, taxi). Road carries freight, commuters, bicycles, tourists, tradesmen, domestic deliveries etc etc. They are completely flexible in providing a door-to-door capability.
I doubt whether a 19th century technology can be made fit for the 21st without leaving it seriously compromised. Far better to implement that which will be fit for purpose for the rest of the century making best use of the technology options available.
A proposition - existing rails should be scrapped. Lines tarmacked over, used exclusively for autonomously driven freight and passenger traffic, powered by induction loops (of some sort) and designed to rejoin the normal network for the leg to final destination. Eliminates most of the flaws in the existing network, removes heavy and volume traffic from the roads.