A simple tutorial for a bare metal usb implementation on an stm32g441, stm32g474 and stm32f042. Check the Wiki for a step by step instruction.
To build the repo, you'll need cmake & ninja. If you want to add an example for another chip, feel free to do a pull request, it should be fairly easy to extend now.