To flash hex files I recommend you to use the STM32CubeProgrammer tool. In STM32CubeIDE only the command line version of the tool is included. The complete STM32CubeProgrammer tool also contains a GUI version. It can be downloaded from the ST web site.