Wait, is this a Logitech mouse or something with a dedicated app? In this case, it would be super easy to map those buttons to existing keyboard shortcuts.
Sadly no I use a dumb mouse nowadays. It’s back/forward buttons are just the general universal ones and not re-programmable, but it’s ergonomics are much nicer than all my re-programmable mice.
I’m pretty sure there are also third-party tools to remap almost anything, but I’ve become quite out of touch with Windows, so hopefully other automation aficionados will chime in.