There isn't a way to prevent moles specifically. But science has shown that wearing strong SPF lotions and hats can decrease skin damage over all. Damage which can cause moles.
To help prevent moles from developing on your face, you can shield your face from the sun while you are outside, and wear a moisturizer that contains an SPF of 15 or greater.