Avoid getting cold sores in the first place by not sharing stuff like lip balm, toothbrushes, or drinks with other people who might have cold sores. The virus that causes cold sores is transmitted through the nose (in mucus) and the mouth (in saliva).
Stress is a big cause of cold sores, along with too much sun (as this can dry the skin out).