Try a different USB comm cable (not designed for battery charger).
I recommend you download and install STM32CubeProgrammer tool.
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
I have Separate USB Cable for Programming which is not designed for battery charger and I have already installed the STM32Cube IDE but still facing the same issue Unable to connect the ST Link Debugger. Could you please connect in teams and resolve the issue.
The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.