From being taught
And who teaches? An another human, right? But doesn’t that human also inherently love other humans? So he must’ve been taught to hate too. If you go step by step into the past, at what point is hate introduced into human society?
Babies are not fully developed human beings, they don’t have a society, culture, or almost anything else, including basic survival mechanisms, so they’re a pointless comparison. It is ridiculous to think they, left to their nature, wouldn’t develop communities, trust and suspicion, stereotypes, etc. that can eventually build up to racism. We have documented wars among literal apes, humans are definitely not much nicer in their natural state (whatever that might be - it can’t be just “being a baby”).