Fundamental attribution error
From BurnZero
The fundamental attribution error (also known as correspondence bias or over-attribution effect) is the tendency for people to over-emphasize dispositional, or personality-based explanations for behaviors observed in others while under-emphasizing situational explanations.
In other words, people have a cognitive bias to assume that a person's actions depend on what "kind" of person that person is rather than on the social and environmental forces that influence the person.