This is a bias that leads to a person taking credit for positive outcomes and blaming external factors for negative outcomes. In other words, anything that we do that we perceive is good or leads to a good outcome we tend to positively reinforce it with self-serving bias. The hidden problem is whether the action is actually good for us in the long term, whether it aligns with our big-picture and that of the civilization and that of society. Assessing each action for its won merits and demerits prior to the outcome can be more helpful so that the outcome is not affecting our judgement.
A concept that is tied to this bias is the locus of control. It is the degree to which a person is affected by their own beliefs vs. external influence. In everyday life this translates into when a person is thinking for himself/herself, it is said that the person has an internal locus of control. Studies show that people develop a more internal locus of control with age.