Banish wouldda, shouldda & couldda.
Stop living in the past. Even if after ruminating for weeks, months or years you were able to figure out just what “you should have done” or “could have done” or what you “would have done” had you known then what you know now, you do not get a “do over”. The past is the past and you cannot change how events played out. And it is unlikely you will ever face that precise situation in the future so that solution so carefully arrived at will be useless. Save your energy.
Rather than focusing on the “why” of the past and struggling to understand just why things happened the way they did so you can identify how it “couldda” been different, focus on “what” … what can I do in this moment that will contribute to my happiness now and in the future. This is not an admonition to ignore the past but an entreatment to embrace here-and-now.