Actually many if not most railroads are now electric. There ase in Europe where rail travel is very common
Most in the US are diesel. The few electric lines are mostly urban commuter trains. Freight distribution is by diesel.