> In the 19th and early 20th centuries
Do you mean this as in before WW1, or after?
If before, then Austria-Hungary was still a thing, and it was a massive multiethnic empire. Ditto Russian Empire in the east, incorporating Poland and Finland and a lot of other stuff.
If you mean after WW1 and before WW2, then we're talking about nation-states that involved large minorities from other states - like Germans, Ukrainians and Belarusians in interwar Poland, Germans in Czechoslovakia etc. There were massive Hungarian minorities in areas separated from Hungary and attached to neighboring countries after WW1. Yugoslavia was a new multi-ethnic country created after WW1, with a bunch of internal conflicts brewing. And USSR regained most of the imperial possessions lost after the 1917 revolution.
On the other hand, after WW2, the Allies didn't just redraw borders, but they executed a massive population transfer operation to avoid large ethnic minorities on either side of those borders. These mostly involved expulsion of Germans from various areas of neighboring countries (Czechoslovakia, Poland etc), but not exclusively - in Poland, for example, there was also a big population transfer between the areas that USSR annexed (Western Ukraine and Belarus) and eastern Poland, so that ethnic Ukrainians and Belarusians would end up in the USSR, and ethnic Poles would end up in Poland.
https://en.wikipedia.org/wiki/Flight_and_expulsion_of_German...
https://en.wikipedia.org/wiki/Operation_Vistula
https://en.wikipedia.org/wiki/Polish_population_transfers_(1...
So I think it's not incorrect to say that post-WW2, European states became more ethnically homogeneous, at least for a while. Whether it actually had anything to do with the period of peace that followed is another question.