There has been a sea change in the last few centuries here, though. One of the most important is probably the development of nationalism, particularly in the 19th century, which increasingly started to identify states with nations (which is to say "nation" as a relatively distinct and coherent racial / cultural group) when before states were just whatever land they could grab. Most of the development of European nations in the last 200 years has been the establishment of nation states, away from unwieldy empires. Much of that driven by the fact that varied peoples in those empires increasingly resented and resisted "foreign" rulership.Prior to Medieval times? Even most of Europe was still forming the nations that exist now within the last century or two. Israel is older that a fair number of countries globally, many of which include ongoing ethnic conflicts because the governments are not equally representative of all peoples ruled by them geographically. That's like every civil war on the planet right now.
In the process, wars have largely been about a) asserting control of territory that states have believed populated by their nation, or b) just establishing dominance. You can even see that now in Ukraine - a major plank of Putin's de facto underlying rationale is that Ukrainians are not a distinct people but misguided Russians, who should therefore be under the control of the Russian state. Thus actually relatively few wars have involved the sort of wholesale conquest you suggest.