Using ST Link and SWD interface (SWDIO and SWCLK pins), You do not need to pull BOOT pin high. If it will not connect, try to use reset pin as well and use option "Connect Under Reset".
Hi,If You need to connect to MCU using UART, You need to first enter embedded bootloader. To do so, You need to connect BOOT0 pin to VDD and then reset MCU. Then it should be possible to connect to MCU from CubeProgrammer.Have a nice day,Tomas
Unused pins should never be connected directly to power rail, because microcontroller can be destroyed, when activating some of these pins in output mode of opposite logic level. This can happen also in embedded bootloader, which usually boots, when ...