Accepted answer
Start with what 1,400 kcal a day leaves you room for, because at that intake the deficit is a live competing explanation rather than a footnote. Protein is 4 kcal per gram, so 100 g costs 400 kcal — 29 per cent of the entire day's energy — and everything else has to come out of the remaining 1000. A day that misses protein at 1,400 kcal has missed it by a wide margin, and headache that tracks those days is a nutrition signal. Then separate the two by timing: a dose effect is periodic and phase-locked to the injection or to an increase, and a deficit effect is monotonic and gets worse the longer the intake stays at 1,400. Log intake, protein and headache on the same daily row for a fortnight and the two patterns separate without any further cleverness. Nothing here is medical advice.
Start with the actual intake, because a substantially suppressed appetite produces deficits far larger than intended and fatigue is the first symptom.
Dehydration from reduced fluid intake alongside reduced food intake produces headache, lethargy and postural dizziness, and is the cheapest thing on the list to correct.
Sleep quality often changes during rapid weight loss in both directions, and sleep debt produces fatigue that no amount of dietary adjustment will fix.
Sleep restriction produces measurable decrements in subjective energy and in training performance independently of energy intake.
Nothing here is medical advice.
Sleep is a variable here too, and no amount of eating fixes sleep debt.