If cold sores are a recurring visitor, a little prevention goes a long way. Because sun exposure is a frequent trigger, the Mayo Clinic suggests lip balm with sunblock, and broad-spectrum SPF 30 or higher used year-round is a simple habit that may help head off new sores.
It also helps to know your personal triggers. The Cleveland Clinic lists illness, stress, sun exposure, trauma to the mouth area, and hormonal changes among the usual suspects, and noticing your own patterns can help you anticipate an outbreak before it starts.
For people with frequent recurrences, there's another option worth raising with a clinician: daily suppressive antiviral therapy, such as valacyclovir taken once a day, which has been shown to reduce how often outbreaks occur, as described in a StatPearls review.
Finally, a quick word on protecting the people around you. Cold sores spread most easily when blisters are present, so during an outbreak it's wise to skip kissing and oral contact, avoid sharing utensils, towels, and lip products, and wash your hands often — especially before touching your eyes, since the virus can spread to the eyes and fingers too.