Racism is usually a notion of people having an explanation for why they behave towards another race.
There are always explanations. I don't think there is any racist that doesn't have an explanation.
For American slavery it was that "African Americans" are just animals, not human. So it made sense to use/teat them like donkeys or vermin.
In Nazi Germany, the explanation was that Jews are veramin and so veramin needs to be exterminated.
In South Africa it was a "scientific" theory they had called Holism [0] which basically described that everything should be kept in its place hence apartheid policies.
In Gaza the explanation is religious i.e God have us land X, and this we need to cleanse the land of it's "invaders".
Also, look at caste systems in India. They have explanations of why they do that. They don't see themselves as racist.
The explanations still occur today using "statistics", "data", & "science" with stuff like IQ "research" & "race realism".
"Racist" is something we project on people.
But racists always think they actually have a Nobel or logical cause for thier activities.