What do you do when things go wrong ?

When things go wrongg i goo rightt.. 😇😇
I mean when everything's seems to be falling apart or not happening as i wanted then i will ask myself what am i doing wrong? What can be done to make it right..??
Sometimes i succeed, sometimes i fail but what's common in both the cases is i learn....😊😊