Unable to connect STM32 in arduino IDE using bootloader

select one of the Maple bootloader option for USB bootloader.

In my experience, the most reliable and simple way is to use the ROM bootloader which listens on RX/TX. I wire a USB to TTL Serial adapter to RX/TX and I use buttons wired to BOOTSEL and RESET to put the MCU into bootloader mode before upload. This is the 'Cube Serial' option.