Mastitis costs more than almost anything else in a small dairy operation, because it takes the milk, then the quarter, and sometimes the animal.
Nearly all of the prevention is unglamorous. Clean hands and a clean udder. Milking right out every time, because milk left behind is where it starts. Dipping teats afterwards. Somewhere dry to lie down, since the animal lies down straight after milking while the canal is still open. Milking the healthy ones before the infected one, and never sharing a cloth.
The early signs are clots or flakes in the first squirts, a quarter that feels hard or hot, and a drop in yield before anything looks wrong.
What is your routine, how many animals, and have you lost a quarter? What did the vet use, and did it work?