This is the only definition of racism I subscribe to:
A man asked the Prophet ﷺ: O Messenger of Allah, is it tribalism (`asabiyyah) if a man loves his people (i.e., qawm)? He said: No, rather [from the characteristics of] tribalism is when a man helps his people to do dhulm (i.e., oppression, injustice). [ibn Majah]
Many today share the questioner’s misunderstanding of blameworthy tribalism/racism, namely that it means a liking for those who are similar to you over and above others. In reality, this is natural to human beings: we are more comfortable with what we are familiar and tend to dislike things which we are not as familiar. But modern notions of racism consider all this blameworthy. Any negative feeling one may have toward a specific kind of cultural practice, behavior, etc., is considered “stereotyping” and “bigoted,” but if you really think about it, this is incoherent.
Furthermore, by this mistaken definition, Muslims are participating in blameworthy tribalism/racism if they love other Muslims over and above non-Muslims and are tribalistic if they prefer that Muslims stick together, etc. But as the Prophet ﷺ clarified, that is not what defines `asabiyyah. What defines `asabiyyah is oppression and injustice for the sake of one’s own group. Keep in mind, though, that part of oppression is thinking badly of people and looking down on them in a fit of arrogance, as the Prophet ﷺ also warned us against elsewhere.