Why can’t I do anything?

Every time I do something strenuous I end up getting a horrific headache. Doesn’t matter if I drink tons of water or eat beforehand. I was outside for about 3 hours pulling weeds and now I am dying from this headache. It’s pounding. The same happens when I do any kind of cardio like running or other exercises. All doctors have ever told me was that I must be getting dehydrated but I am actively drinking water or electrolyte water and it still happens.