The 20-20-20 rule works but you need to actually stick with it - set a phone alarm or timer that goes off automatically so you don't have to remember! Beyond that, adjust your screen brightness to match your room's lighting, keep your monitor at arm's length and slightly below eye level, and make sure you're blinking properly (people tend to blink way less when focused on a screen, which dries everything out).
Blue light glasses might help a little, but honestly the positioning and taking actual breaks are what make the real difference - I've seen people swear by them while doing nothing else and still complaining about their eyes hurting, so don't expect them to be a magic fix on their own.