Hello @Leila_Megdiche and welcome to the Community :),
I've translated your question with a web-based translation tool to increase the chances that you will get an answer from our experts and community members, as the majority communicate in English:
I am unable to debug the code on my STM32WLE5JC board. STM32CubeIDE displays an error message indicating that the ST-Link is not connected. However, the ST-Link is correctly detected and connected in the STM32CubeProgrammer.
Which STM32CubeIDE version are you using?
Could you please take a look at this post: ST link upgrade issue, I think you've encountered the same issue.
I hope this help you.
Kaouthar