City trains are often automated[1]. Have been for decades as far as I know.
Long distance or regional trains are often driving on very very old train networks.
I don't know much about trains, but I guess if you would build a new train line now you could also automate it. But that is just a guess.
[1] https://en.wikipedia.org/wiki/List_of_driverless_train_syste...