Don't. Just don't. G502 HERO firmware update through G HUB is broken. Waited for over 1.5h with the mouse "updating" and not working, and at the end had to disconnect and reconnect
Programming gaming-mouse buttons using Logitech Gaming Software
Logitech Gaming Software Not Detecting Mouse - Quick Fix