If you're not from any country that the train travels through and you're taking a few trains, then maybe getting an Interrail pass[1] would be an option. You need to pay a bit extra for seat reservations and sleeper trains, but it could work out better in some cases[2].
[1]https://www.interrail.eu/en [2]https://www.seat61.com/how-to-use-an-interrail-pass.htm#over...