Yes spending too much time on the computer and looking at the computer screen for too long without a break can damage your eyes.
When you're constantly staring at a computer screen and not taking your eyes off the computer screen to look at other things such as looking out a window as something then your eyes muscles get strained from staring at the computer screen for too long.
So if you spend 8 hours or more on the computer whether for work or just at home or when you're working from home you should take your eyes off the computer screen for at least 10 to 30 minutes to allow your eyes to not be strained as much.
Just simply getting your eyes away from the computer screen even for a little while helps prevent eye strain and headaches.
Sitting at the computer too long also can be bad for your health because it can cause health issues such as heart disease, blood clots, strokes and even sometimes diabetes.
Sitting too long has also been shown to cause cancer in some people.
You need to move around so when you work at a computer always take the breaks when you can.
If you work from home like I do you can take as many breaks from the computer as you need too and walk around or go outside when it's nice weather outside.