How to improve ergonomics so I can stop having this pain in my wrist?

Lots of advice. Here's a Govt link from OSHA but there are many online - just search using words: ergonomics and wrist. Also, a visit to an office supply store or website. It can be trial and error to find the best for you! https://www.osha.gov/SLTC/etools/computerworkstations/components_wrist_rests.html But if you have patience, you can. If it's at work - your boss may pay for it.