Update Your Logitech Firmware With the Logitech Firmware Update Tool - YouTube
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
Update: resolved, API reinstated and commitment to keep it around] Logitech Harmony removes local API - Home Assistant
Logitech: Firmware-Update macht Funktastaturen und -mäuse sicherer | heise online