Why is it that every time you get a headache, you throw up and you’re fine?

Vomiting during a headache reduces intracranial pressure and also prevents the release of certain pain-causing substances, thus relieving the headache.
Increased intracranial pressure due to cerebrovascular disease, hypertension, craniocerebral injury and inflammation can cause headache, nausea, vomiting and other symptoms. Symptoms are relieved when intracranial pressure drops after the patient vomits.
Since there are substances in the stomach contents that cause headaches, such as alcohol, viruses, bacteria, etc., vomiting removes such substances from the body, reduces the irritating effect of the resulting toxins on the body, avoids spasms of the blood vessels in the brain, as well as the release of pain-causing substances, thus providing relief from headaches.
The symptoms of headache and vomiting need to seek medical attention in time to identify the cause and carry out targeted treatment under the guidance of professional doctors.