Tl/Dr dwarves and elves have a complicated history. They do not all hate each other and they do not all love each other.
The elves and dwarves of Tolkiens legendarum have animosity towards one another. But saying "the elves would genocide the dwarves" no, the Elves as a whole would not wish to exterminate the dwarves as a race. There were some among the Noldor (a part of the population of High Elves that left Valinor to reclaim the Silmarils from Morgoth) that believed the dwarves had cheated them. The Dwarves tell it another way, Tolkien is unclear on the truth of the matter. However those dwarves were not the clan of Longbeards. The Longbeards do not come into the tales of the first age. Their halls were east and south of Belariand. In Khazad-Dum.
All that to say the animosity between the elves of Lothlorian and the Dwarves of Khazad-Dum can probably be traced to the fact that most of the Elves present are dark elves/green elves. Who also has their own unrecorded spats with dwarves of different clans. (Also the fact that the dwarves unearthed a balrog probably doesn't help matters)
So yes there is animosity between the two races. But there is also friendship. The elves of Holand and the dwarves of Khazad-Dum were united in friendship. A fact somewhat touched on, in the recent show the Rings of Power. (Although poorly done in my opinion)
Why do you think the friendship between Legolas and Gimli was so notable? Cause dwarves and elves get along? No, cause they historically despise each other, talk down about each other, and distrust each other. Elrond, as well as all the elves of Lorien are openly hostile and intolerant towards Gimli and the dwarves and talk about them like they're animals. I dunno what you call that but racism
I've already commented on another post with the why and how the dwarves and elves might dislike one another. But to say the Elves would "genocide dwarves and enslave men" if they ruled Middle Earth (spoiler they did rule Middle Earth for a time and none of that occured) is blatantly wrong and antithetical to Tolkien's work.