Usually a solution to this involves both some out of game and in game lubrication.
Agree As A Group
Does everyone want to play a game with this tension - the players and the DM? The DM can always disallow choices at their table if they think it’ll be disruptive to the game at hand. The group needs to say that:
- They want to work together and stay together
- They understand their choices are making that harder and when it comes down to it they will need to prioritize #1 above “My Guy Syndrome.”
Also, it’s an opportunity to introduce racial tension and dynamics into the game, but not everyone wants that, so other players have a vote too.
The “generic” racial attitudes in D&D don’t hold in all campaign worlds or even all of a given campaign world. If people just want the sweet stat bonuses without the roleplay you can just remove that element if that’s the kind of game you want.
Now as for in game...
Individuals are Individual
Sure, these different humanoid species, in general, have beefs with each other. But just like real world people groups that have beef with each other, it’s severe in some places and with some people and not so severe in other places with other people. There’s some orc with an elf fetish out there somewhere, or that was rescued by elves as an orphan, or... Loki and Thor from the Marvel movies are semi good examples if Loki calmed down a little.
Depending on what setting you are using there are usually plenty of examples of atypical race relationships. Remember, PCs become adventurers because they are exceptional - if they were they typical member of their culture they’d have some lame job and not speak until a PC entered their room.
We Have A Job To Do
How many books, movies, and TV shows have a premise where people that don’t get along are brought together because they have a bigger thing they need to achieve? Conservatively, half, starting with the Epic of Gilgamesh? Read a book!
Aliens and humans, vampires and humans, jocks and nerds; from serious things like Hidden Figures and The Green Book to the ridonkulous like Abraham Lincoln: Vampire Slayer and Enemy Mine, you have historical foes brought together because there’s something they need to achieve together, a doom they need to escape and need every hand, or just work for someone who doesn’t give a crap about their beef.
This requires you the DM to come up with a premise that ideally lets players who aren’t My Guying too hard to have something to cling to in order to justify their character still working with another.
I’ve been running games since the ‘80’s and I’ve seen every single weird combination of characters; but as long as players understand the group’s fun comes first and the DM and players put some basic hooks into the game to foster cooperation it shouldn’t be much of a problem.