Doubtful that the mastitis vaccines that are available for use in dairy cattle are gonna help you much, if at all.
Staph aureus vaccines are used in herds that have a problem with coagulase+ Staph mastitis, and while they don't necessarily prevent infection, they do help diminish the increased somatic cell counts(SCC) that mastitic cows have - and help keep bulk milk SCC below the 'cut-off' level, where the milk processor will refuse to take the milk.
The E.coli J-5 vaccine is used to minimize death loss due to coliform mastitis - those cows that contract coliform mastitis 'crash and burn' - they may be fine at one milking, and near death before the next one. It's a milking management and environmental problem, but vaccination may make economic sense in a dairy setting.
Neither of these problems are likely to be the cause of pre-pubertal mastitis in heifers; those cases may be due to another heifer sucking - or sometimes self-sucking, or due to horn flies feeding/biting on teat ends and introducing bacteria (probably not coag+ Staph or coliforms) into the teat canal.
I had one first-calf heifer calve out with one 'blind' quarter this year, but she's done a good job with her calf, and she'll get to stay.
Had a 5-yr old cow with one big, ugly front teat -very different from the other three - calve out last spring, and when I got her up to milk that thing out, it turned out that it was the only teat that didn't have a teat canal completely filled with scar tissue. Never could get the calf to suck that big ugly thing. Fortunately for him, we had another cow lose a calf to scours about the same time, and we grafted him onto the other cow and sent the one-titted cow to the salebarn - where I instructed the folks that she was to go for slaughter only.
Sometimes things just happen. I don't think vaccinating for mastitis is gonna help you; I wouldn't do it in my beef herd.