agreed, just '3 pins' swdio, swclk, gnd is adequate and safer.
btw I've been a 'can't be bothered' e.g. connect 3v3 to 3v3 as well. no magic blue smoke provide one is not silly enough to connect VCC (5v !) to 3v3.
the idea is that if both sides are 3v3, then that 'in theory' no current flows
oh and another tip for op. if one gets the stm32f401 or stm32f411 'black pill'
e.g.
https://github.com/WeActStudio/WeActStu ... iSTM32F4x1
then you won't need the st-link v2 if you just want to program the board.
rather under Upload method, select > STM32CubeProgrammer (DFU)

- upload method DFU
- stm32cubedfu.png (24.9 KiB) Viewed 6069 times
and simply connect the usb (phone) cable to the board. (no st-link is needed)
before you click 'upload' (in the Arduino IDE) you need to do this
- press both reset and boot0
- hold boot0, release reset
- release boot0 3 seconds later
I'm not sure if in windows you would see any responses, but that puts your board/chip in DFU (programming) mode
then you click upload to upload the sketch/firmware.
it should start programming and shouldn't take too long.
then when you simply press reset, your sketch should run.
for stm32f103, you need the st-link dongle and the 2 usb cable approach, one for the st-link (programmer) and the other is the *serial* connection to the board.
STM32CubeProgrammer (DFU) doesn't work on stm32f103, it is only available in some socs e.g. stm32f4xx / g4xx family.
stm32f401 or stm32f411 is recommended for 'beginners'
- fast (faster than stm32f103, has 'ART accelerator' and fpu)
- has more sram like 32k or more
- has more flash for the stm32f4xxceu ones like 512k flash
one can practically load 'huge' sketch into it and not be bothered about pinch to save on every byte of the compiled sketch binary.
most things should 'just works'