I believe the answer is: Cognitive dissonance
In psychology, cognitive dissonance refers to a situation when an individual is having inconsistent thought, behaviors, or principles.
Cognitive dissonance is much more common among people in teenage-young adults when their moral compass is still not fully developed yet.