For a while now BetterTouchTool [0] supports Logitech mice [1]. It's paid, but it's absolutely worth its price. It's super powerful and you can do all kinds of funky stuff with it, not only mouse related. I would suggest looking into it if you want more advanced features, I've been a very happy user for many years now.
[0] https://folivora.ai
[1] https://docs.folivora.ai/docs/normal-mouse/logitech