Try using a different cable (make sure not use charging cables as it won't work)
I recommend you upgrade the ST-Link firmware.
Imen
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