When very young and small consider proper box that can be secured on the back seat.
When older get a seatbelt compatible harness and a good seat liner. Put an old towel on it to absorb fluids!
Keep a couple of spare towels and a pack of baby wipes too.
Ask me how I know!
Just an afterthought....be aware that some dogs get travel sickness too. Let the dog have time in the car even at home to familiarise.