It's a bit like an insurance policy. You may never need it, but.....
As Scarlet Dragon says, the most common vaccine used by smallholders is called Heptavac. It protects against several different, mostly soil borne, diseases. We once bought sheep which we were told had been vaccinated. However, one died shortly after arriving of what I'm pretty sure was one of the diseases the vaccine protects against. If I'm right, and she was never actually vaccinated, she'll never have been exposed to it before arriving on our holding, and then had no immunity. Does that make sense?
The usual regime is that breeding stock get an annual booster about a month before lambing, to maximise immunity passed to their newborn lambs. Then lambs get one jab at a minimum of 3 weeks old and another a month later, followed by the annual booster thereafter.
HTH!