Your eyes could hurt for a variety of reasons - brightness, too long screen time, being dry for external reasons, etc. Most humans are poor at identifying the cause of one-off events: you may think it's because you turned on a blue-light filter, but it actually could be because you used your phone for an hour less.
That's why we have science to actually isolate variables and prove (or at least gather strong evidence for) things about the world, and why doctors don't (or at least shouldn't) make health-related recommendations based on vibes.