>> I guess it depends on pin layout or similar?
You guessed right.
- download cubeMX,
- open a new project with your STM32G071RB(your package digit is missing) mcu, File->New
- press Alt+L, enjoy the list of compatible mcus.
for example: STM32G071RBIx
we dont need to firmware by ourselves, lets talk