When you fail to achieve something, it is an opportunity to figure out where your weaknesses are. On one part, see that failure as a gap in your own knowledge. What did you not know? On another part, see that failure as interpersonal. How could you have conveyed it better?
In the same way that you ruminate after realizing your failure, ruminate on the next steps. If you write it down, it is tangible to act upon. It is a written promise to carry you forward. If it stays in your head, it’s just a thought. And thoughts by themselves are fleeting.
Otherwise you’ve only thought of ways you’ve failed but drew no proofs to success.