There mainly 3 ways to prevent this. 3car specification.
Never leave your stomach empty while you're in the car(whether driving or not)- when you are hungry, your glucose level is low it makes you easier to feel dizzy. Sour plum helps-sweet, mouth-watering.
Look outside(far object/don't focus on anything if can). Stop playing with phone or search for anything(stop the car if necessary)-it's taxing to look at something in the car while it's moving.
while glazing out of the car, hold on to something rigid. it helps balancing. And also remember to breath properly (some people have physiological subconscious making them hard to breath in the car)
Avoid buying cars with torsion bar suspension (usually rear suspension), they are more shaky compared to independent suspension which usually cost more.
Hope it helps!