OSHA recommends having the top of your monitor at or below eye level. I used to do the opposite - I figured having a higher monitor would force me to look up which would keep my neck straighter, but it seems that it's actually better to keep your head looking a bit downwards - perhaps it's a more natural and relaxing position for your neck? In any case, lowering my monitor did seem to reduce my neck pain.
I also got a split keyboard which I think helped me improve my posture by allowing me to sit back more comfortably with my arms apart. I got a Dygma Raise but there are plenty of options and they're probably all fine.
Exercise also seems to help, especially shoulder/back exercise.
https://www.osha.gov/etools/computer-workstations/components...