There's something called safe eyes on Linux. Every 15 minutes, it has you do eye exercises to look away from PC and every hour it forces you to take a longer break. There might be similar features on windows and mac if you look for it. It has done wonders for me.
I used SaveEyes on Linux:
https://github.com/slgobinath/SafeEyes
Here I found a list of alternatives that do something similar: