Keep track of what you’re eating. Is there something you have with every dinner after which a headache occurs? May be a food allergy.
Try to even out the amounts you eat. Make sure it’s balanced. Make sure the deficit isn’t too extreme.
Try going 16:8 for a week.
There could be other issues but before jumping to conclusions, eliminate simple causes.
Also, could pose your question over at r/nutrition.