Work out and lift weights. But ergonomically speaking I use a Kinesis Advantage 2 keyboard and a Logitech MX Vertical mouse. You may also need a long break to heal, which might not be an option if you're American. An engineer from Germany I know had something like 4 or 6 weeks off work when diagnosed with RSI and nobody batted an eye.
Ergonomic keyboard and switch to trackball helped a lot, but exercise helped the most. I find it doesn’t even have to be weightlifting or anything with the hands. It’s more about the cardiovascular workout. Running and cycling have improved my rsi significantly.
I’ve trained and raced bikes for years and I’m currently on a break from cycling and now I’m running 5-6 days a week instead.
I’m eventually going to build a gym in my garage because I felt so dang good overall during the period I was lifting that I’m now convinced it’s part of the key to keeping my body from falling apart as I age.