-
If you are going 1 way, then the train is a better option.
It is super easy to use.
I recommend using Trainline, it will search all the providers and give you one unified ticket and it is often cheaper than buying from SNCF or whoever.
Car rentals are also relatively cheap at like 30-50 euros a day.
I drove from Barcelona to Marseille and the roads are like normal US roads.
Parking was pretty easy too.
A car gives you more flexibility to stop in small towns but doesn’t make sense if you are only going one way.