No one can Tell the reason without examination.. but everyone can guess.. Probably it’s due to stres
i think u need share more details then u can better result (what types headache, how long expierienced, pain how many hours etc)
Consult doctor and u can chek ur neck muscles and give massage time to time and strech it, use heat pack on ur neck, chek ur room air, and don't miss ur meal. I hope u will be fine