We tell ourselves stories. This seems to be a basic condition of human existence. Everything that happens to us that rises to the level of awareness is fitted to an ongoing narrative we construct. Largely we are the heroes of our own narrative.
When we create ourselves as the hero we are subject to cognitive error. Say for example your boss hammers you on some point at work. Narratively that is hard to reconcile with your position as hero. In many cases, and particularly as you retell the story, your bias moves more and more toward the hero narrative and invents or embellishes the details needed to go along with that narrative.
A better approach is to construct a counterfactual story. Imagine the exact same scenario but construct yourself in the least ego friendly light you can manage. In the boss example, assume you were completely in the wrong and were actively deserving the hammering. What does that look like? What conditions would make it the case that this were true? By having this competing narrative you expose your thinking to other possibilities about what happened. It provides perspective on our natural tendency to want to be in the right or to be the hero. The goal isn’t to put yourself in the wrong or to tear yourself down but rather to find a balance.
Something to consider for your mental toolkit.