What's the best way to stop my boobs hurting it is due to my period coming?

Not much. Some women are more sensitive than others to hormonal changes. Sometimes pressure from a tight brassier might help, but it may not either.
Iodine supplement. It is unopposed estrogen stimulation - try iodine supplement daily until symptom stop occurring.