Why does learning new mental skills lead to headaches?
Migraine and tension-type headaches are an important burden in many people's daily lives. This is not my direct research topic. But as far as I have read on the subject headache has been related to posture problems and vision problems. Some studies point to an increase in headache complaints, related to increased hours of study online. But this can also be related to posture and vision (tired eyes or dry eyes). Of course, the occurrence of headaches can affect the quality of the study (and acquisition of new skills), but estimating the opposite apparently still lacks proof. I leave below some links of articles about the subject that may be of your interest:
Behavioral Treatments for Headache,
Headache vs musculoskeletal pain vs vision problems
Headach - clinical setting