How can spider veins be prevented when young?

No preventable way. Thr risk factors for development of vein problems include heredity, pregnancy, obesity, lifestyle (standing long periods), age. One can have spider veins without having underlying venous incompetence. There is no good preventable method to avoid spider veins.
Seek eval early. I agree with drs isobe & king that you can't pick your parents; you can't avoid the most influential factor in developing vein disease. I would add that chronic vein disease can begin in teens and progress thereafter. What one sees at the surface can sometimes belie significant underlying problems. Seek evaluation early so a board-certified phlebologist can be proactive in dealing with your issues.
Hormonal. Most spider veins in females is hormonal so there is no great prevention. However there is data that falvinods which can be found in white pulp of oranges and grapefruits. Alternatively hesperiden and diosomin can be used. Also horse chestnut extract has been used. All these may make the vein wall stronger and reduce the possibility of vein leakage.
Not much. The main reason why people develop any vein disorder (varicose veins and spider veins) is because of heredity. If you got the wrong set of parents and inherited their vein troubles, it is very likely that you will have vein trouble too. Spider veins can be caused by an injury and being overweight might contribute to getting spider veins but heredity is the biggest factor.