Sometimes headaches are harmless and may be the result of lack of sleep, stress, too much alcohol, dehydration... But, depending on where and how it appears, it can be a serious health problem.
If a lightning headache appears "out of the blue" and reaches its maximum intensity in a few seconds, it can be an indicator of a number of health problems, including bleeding due to blockage of arteries in the brain, which is life-threatening.
If a headache occurs early in the morning, it should definitely be checked by a doctor because it can indicate a brain tumor, apnea, very high blood pressure...
You should also consult a doctor if you experience changes in vision, digestion, or mood along with the headache, as well as tension in the neck or irritability, or if the pain occurs after a blow to the head, it lasts 24 hours.
Bonus video: