I'm nearsighted with no astigmatism, so I have a simple -2/-2 prescription (if I remember correctly). I sit at a screen 8-16 hours a day. I get strong headaches every single day, for which I keep a supply of ibuprofen at work and home. 400mg a day is generally plenty. I do not wear my glasses while at the screen, as it's close enough that I don't have any issues. I suspect my headaches are neck muscle related, not ey…
Are you using a laptop (looking downwards) or are you using a proper screen setup?
Make sure your posture is correct when sitting in front of a screen before attempting anything else.