It’s been traced back to the Congress of Vienna. If those people had respected national aspirations and drawn the borders along logical lines we could have been spared a century of abortive revolutions, the Franco-Prussian and subsequent world wards. Instead they tried to turn back the clock.
The Congress of Vienna occurred with a splintered collection of German states dominated by two (Vienna and Prussia). The 20th century was really impacted because the latter beat the former for leadership of those states in 1866, creating 1) a large new “Germany”, and 2) Austria-Hungary, which looked south (to the crumbling Ottoman Empire) for expansion. Besides the World Wars themselves, during the 20th century the Allies awarded (after WWI) then stripped (after the Cold War) Serbia of plenty of territory/people, causing much of the strife there at the end of the 20th century.