For me it was not drinking enough water. The days I’m more active gardening, getting 15k-25k steps I get headaches. I do 20:4 & 24, alternating days currently. When I did 18:6 I got nausea and dizzy. When I did 16:8 I had the worst re-feeding cramps and headaches. I’ve been fasting since Oct 2015 started with 18:6 for 5 years now primarily 20:4, omad 2x/week. So try more water first or electrolytes. For me it takes about 5 minutes if it is an water issue, before the headache stops.
I’ve dealt with chronic migraines since I was 11. On days where I get one that I know wasn’t caused by just my body being a douche (when you’ve had them this long you can start to tell the triggers), it is almost always caused from me not drinking enough water. Most people, especially being active, truly underestimate how much fluid intake they are getting. I’d suggest starting upping your water intake, maybe adding some salt in of you’re feeling your electrolytes may also be a cause
Look up Hi-Lyte brand electrolyte concentrate. It contains salt and other minerals. Zero calorie.
The other thing to keep in mind is sleep. Has IF affected your sleep? It has for me, I sleep less while fasting which can lead to headaches/migraines.