Thanks for using the forum. I am happy to address your questions, and my answer will be based on the information you provided here. Please make sure you recognize that this forum is for educational purposes only, and it does not substitute for a formal office visit with your doctor.
Without the ability to examine you and obtain a history, I can not tell you what the exact cause of your symptoms is. However I will try to provide you with some useful information.
There are several causes of headaches. Headaches can be divided into primary and secondary. Primary headache disorders are headaches without a direct cause. Secondary headache disorders are due to an underlying problem, such as a tumor, medication side effects, central nervous system infections, clots in the veins in the brain etc.
There are several primary headache disorders. Some of these primary headache disorders are characterized by stabbing pains lasting seconds. In primary stabbing headache, sharp or jabbing pain in the head occur, either as a single stab or a series of brief repeated volleys of pain. Primary stabbing headache often occurs in people with migraine. The pain itself generally lasts a fraction of a second but can last for up to one minute in some people. Another type of stabbing headache is called paroxysmal hemicrania. This is marked by episodes of stabbing or sharp pains that occur on one side of the head and may be associated with eye tearing or runny nose. Episodes may occur several times and last 30 seconds to a minute. Yet another type of stabbing headache is abbreviated SUNCT; 100s of stabbing pains lasting seconds occur and are associated with red eye and tearing. Stabbing pains occurring around the eye at night may be due to cluster headache; the pain is excruciating. This is more common in men.
As you can see, there are many types of stabbing headaches; an underlying cause is rare, and these headaches usually respond well to appropriate therapy. Each has its own specific treatment regimens, and I can not recommend a specific therapy for you without further history and examination.
Without further information about your headache, it is difficult to provide you with adequate information. However, it is important for you to understand that if you have not experienced headaches in the past and you are now having new head pains, seeing a neurologist is a good idea, just to make sure there is nothing serious causing this pain. Evaluation with imaging testing may be indicated as determined by him/her. He/she can also make a diagnosis for you and recommend specific treatment.
Thank you for this opportunity to answer your questions, I hope you find the information I have provided useful, good luck.