The costs are pretty evenly split between: 1) Maintaining track 2) Buying/leasing/maintaining trains 3) Staff
The single best thing you can do to drive down train cost is to put more people on each train.
Based on these sources: https://www.statista.com/chart/20169/gb-rail-fare-spending-b...
https://transport.ec.europa.eu/document/download/f5c82d86-23...
I understand where the costs come from, but how trains are more expensive to operate than airplanes is still baffling to me.