What should I do to prevent my serious headaches?

See your doctor. You need a thorough history and physical to look for triggers and to determine what kind of headache it is..Migraine vs temporal arteritis vs tension. I have seen headaches disappear with good chiropractic care; with chinese medicine and acupuncture; diet changes, herbs, better hydration, meditation, tai chi...So beginning with a good evaluation will help.