This tutorial is specially for Mac users. It has been tested on Apple Silicon devices (M1/M2) and should also work on M3/M4 chips.
First, you need to download the older version (1.19.0) of STM32CubeIDE, as the newer versions have some GUI issues. The 1.19.0 versions dowload link in given in comments.
After that, you can follow the tutorial to learn how to generate a HEX file and upload it using STM32CubeProgrammer.