Origin Story:
Lots of people are self-centered and deeply opinionated as teens, so we all start out that way. Plus, we take attitudes from our authority figures, friends, parents, and other family. I'm not sure how old the character is, but in this aspect, the younger the better. Give them a 'justification' for why they are the way they are. But also why they might be willing to change. Show the bias pounded into them, but also the kernel of redemption that can grow into being the good, lovable person you want them to be.
Justification: So perhaps Mom talks about those vile (insert epithet here) staring at her in the store, who she's sure wanted to rape her. Uncle Joe has a business with derogatory images on the wall and a Confederate battle flag, and openly speaks about lazy minorities. But Dad will say epithets and then act embarrassed, like he's ashamed at what came from his mouth, quietly saying things in private that make you realize he's saying it to fit in and out of habit. Needless to say, your MC is Dad's favorite.
Doubt: So show the attitudes coming through, but start with justification. Then add doubt. I remember listening to a story about a skinhead doing pick-up work for a Jewish business owner who treated him the same and gave the skinhead bonuses for working hard. The skinhead's response was, "You make it hard to hate you." The same skinhead had a very young daughter who was half Italian, and others in his group were prejudiced against Italians. That was the straw that broke the camel's back.
Personal action: Remember, everyone believes themselves to be good and fair, and your MC shouldn't be doing anything blatantly unfair (they just believe the people who are others are somehow inferior and/or bad, and thus suspect). Don't use these examples, but find personal ways where others show kindness and fairness. The more extreme hate of others around the MC will make them want to distinguish themselves from their more extreme counterparts. Perhaps your MC witnesses an attack on a minority, and intervenes because they feel it is inherently deeply inappropriate to treat even inferior people that way. This opens the character to gratitude, or grudging respect, possibly even a friendship with the group they are biased against.