I've tried very hard to look for something that would make taking the train even remotely competitive with using my car, but unfortunately there is absolutely no convenient option in my particular case (and even in the more common cases, train is just as cheap or as fast as car in the best case, rarely better).
And It's not all about cost. Just to add two factors that you might want to consider as relevant::
How can you use the time. Eg in a train you can read a book, do an online course, ... even work if you feel the need. I'd choose a 2h train ride any time over a 90 minute drive. Twice a week 60 minutes spent on a good course book or online course will in the long term give you much more value than the price of the train ticket compared to the price of gas.
And of course environment-wise the choice is obvious.
https://www.adac.de/infotestrat/autodatenbank/autokosten/aut...