A quick disclaimer, I am not qualified in any medical field. This is just my experience with sitting for 8+ hours a day and not turning into a hunchback. I have experimented with different desk and chair setups, gone to physiotherapy, and tried so many different exercises. I feel confident that the time I'm spending sitting down is no longer ruining my body. I used to have serious headaches at least once a week, and my back felt tense and pinched in certain spots 24/7. And I was only 22.
Okay, so this seems obvious. But nobody really gives you advice on how to do it. I was always told I had poor posture, and that I should just "sit up straight". But the second I got focused on work, I would naturally go back into my bad posture (prawn mode I would call it). I did some research and it turned out I had rolled shoulders. So I started doing the exercises they recommended to strengthen certain muscles at the end of every gym session.
After about 3 months, I had significantly improved my posture and no longer had any pain or headaches associated with bad posture. I can't recommend a physiotherapist enough for this. It took my physiotherapist about 2 whole minutes to figure out exactly what the issue was, and the other 58 were spent explaining the issue and showing me how to do the exercises she was prescribing.
I try my best to go for a quick walk when I finish a task. Before COVID, I would walk to the shops to go and buy lunch (about 15 minutes of walking in total). I drink loads of water, so a quick walk to the watercooler and then the inevitable need to use the bathroom afterward was usually enough along with my other activity to get around 5000-7500 steps in a day. It made a huge difference. It's seen as being unproductive to get away from your desk often, but I find that it helps to clear my mind and keep me energetic.
Smartwatches are a great tool to help you with this. They have sedentary alarms that will advise you when to get up and stretch.
If your job requires you to sit for 8 hours a day. You might as well learn how to do that properly.
For me, my checklist is always:
There's a whole lot more one can get into with ergonomics. What type of chair to use, what is the best type of mouse, sitting or standing up, etc. But even the most ergonomic setup money can buy won't save your body from 8 hours of sitting if you're not at least making up for it with regular walks and exercise. Ergonomic office equipment can aid you in maintaining good posture, but it's not going to change the fact that we as humans aren't suited to sitting for such extended periods of time.
Above is my setup. I use the MacBook trackpad because I find it more comfortable than a mouse, and I enjoy using the MacBook keyboard too. The laptop screen is used only for quick tasks such as messaging, and the top display is used for 90% of my work. It's lifted higher up with 4 relatively thick textbooks. My chair is an office chair with decent back support, but it wasn't expensive at all (around R2 000 or $130) but it gets the job done
So in conclusion, go for walks, fix any posture issues (go to a physio for a diagnosis) and make sure your setup has the bare minimum for comfortable working.