LinearMouse is a free and open-source application for macOS that allows you to customize the behavior of your mouse (with per-device settings), allowing you to ditch the infamous Logitech Options app, which is a resource hog and has a terrible UI.
It is also available on Homebrew.