How to connect stm32 to a programmer?

Most STM32 boards are programmed/debugged over SWD (Serial Wire Debug), using tools like ST-LINK, J-Link, or CMSIS-DAP. The wiring is…