Not necessarily. Look at this itinerary e.g.: <https://thesavvybackpacker.com/cheapest-travel-europe-train-...>. With a few exceptions, train was cheaper than the plane, often several times.
And now for what happens when it’s more expensive and inconvenient to be concerned about the environment: <https://www.thelocal.no/20230125/why-cross-country-flights-a...>