The error I receive via STM32CubeProgrammer is the following: DEV_USB_COM_ERR.
I opened the program, I saw that ST-LINK was already selected and I tried to Connect to the device, but I received the first error.
I then disconnected the ST-LINK to the MCU and tried to refresh the ST-LINK list and it detected that there was no ST-LINK connected. Tried unplugging the USB and plugging it back in but nothing worked. This a couple of times.
After a while it detected the ST-LINK, I tried to connect to the MCU and it gave me the same error.