I think it's energy moving up to your head and getting stuck on a energy block/issues/fears. It's the energy hitting these issues and working on them...or it's energy buildup caused cause the energy is not flowing through your energy system or a chakra being blocked
This has happened to me many of times. It will release so keep meditating or work on the chakra where it feels like where it is hurting you/getting headaches. If it's headaches i would think it's third eye related and if not that then crown chakra.
Also, if you can work with a guru the guru's energy will help release the energy build up.
Also, try grounding yourself or use a mudra that will let the energy flow downwards. Mudra's like gyan mudra upside down while meditating, Prithivi mudra and Kali Mudra(Then, bring your hands to Kali Mudra by clasping your hands, extending both index fingers. Then,rest your hands in your lap. Feel how grounding Kali Mudra is, and how the joined index fingertips bring focus. Hold Kali Mudra until you’re done with your practice. Kali Mudra is about finding direction and truth and having the courage to get out of your comfort zone..)
https://jenniferreisyoga.com/blogs/3...ing-practices/
Good luck!!!