Copied from NHS website:
Could it be something serious?
In the vast majority of cases, a headache isn't a sign of a serious problem. But, rarely, it can be a symptom of a condition such as a stroke, meningitis, or a brain tumour.
A headache is more likely to be serious if:
it occurs suddenly and is very severe – often described as a blinding pain unlike anything experienced before
it doesn't go away and gets worse over time
it occurs after a severe head injury
it's triggered suddenly by coughing, laughing, sneezing, changes in posture, or physical exertion
you have symptoms suggesting a problem with your brain or nervous system, including weakness, slurred speech, confusion, memory loss, and drowsiness
you have additional symptoms, such as a high temperature (fever), a stiff neck, a rash, jaw pain while chewing, vision problems, a sore scalp, or severe pain and redness in one of your eyes
If you're concerned that your headache might be serious, you should seek immediate medical advice. Contact your GP or NHS 111 as soon as possible, or go to your nearest accident and emergency (A&E) department.