How to trigger an action from extra mouse buttons on a logitech mouse?

I have a logitech G604 mouse. It has lot of side mouse buttons.

I want to trigger an action from these buttons.

At first I thought ok, there is a logitech software that runs on macOS its called ghub. In there, you can set it to trigger keys, so I set it to F12.

But then in BTT it doesn't detect that F12 is pressed.

Then I try maybe a shortcut. Like command+shift+L. Again, BTT doesnt detect that shortcut.

How can I trigger something using these buttons?