One possibility is a problem in the cervical spine.
The other is stabbing or "ice pick" headache, which are often cause unknown.
However they can also be more associated then a regular headache with neurological causes, such as aneurysm, tumor, etc.
So an examination of head and neck and neurological examination are in order at this point.;
If this is thought to be neck, and MRI, as see what is going on and getting the correct physical therapy
would correct this.
Let me know if you have further questions, details or need clarification, just use reply.......
Please Click Accept to give answer credit so I am compensated for time and expertise. Come back if needed. Bonuses and positive feedback most helpful. Answers for informational purposes only, not to replace your physician advice or visit.