Sanctions & Interventions ... do they work?

I was - after watching the news- wondering about the effectiveness of sanctions and I turned once again to my preferred panel of 'experts' - ChatGPT and Google Bard. To reverse West African coups d’etat, or bring about change - do you believe sanctions (by regional organisations) work?

[ChatGPT] Sanctions - such as those announced by ECOWAS -  are one of the primary tools used by international bodies to respond to coups d'etat and other similar situations. They are designed to put pressure on the government in question by restricting trade, aid, and other forms of economic engagement. The idea is that by making it difficult for the government to function and maintain popular support, it will be encouraged to change its behaviour or policies.