Serbia, Bosnia, Albania, etc were all kingdoms in the late Middle Ages, before being conquered by the Ottomans. But a lot of them were formal kingdoms (or even Bans, duchies, etc) for just a few hundred years before being conquered by the Ottomans and ruled for... a few hundred years. Also, language (traditionally a strong divider of ethnic identity) wasn't a huge factor, since Serbs, Croats, Bosnians and Montenegrans speak very similar dialects. I wondered if, in the case of the Croats and Serbs, the issue was that Croats were ruled by the Habsburgs and Serbs were ruled by the Ottomans, but checking a bit, it seems like it wasn't quite that simple, with Serbs living in Croat areas and vice-versa.
It is of course not impossible for areas to keep a strong sense of self despite lacking self-rule (Wales, for example), but I wondered if the Ottomans had some particular policies that entrenched the divisions between, say, Serbs and Bosnians, to the extent that they formed distinct enough areas to be noticeable enough in the 19th century to be carved out appropriately (Bosnian crisis, Kingdom of Serbia).
Or, is this a case of areas being carved out in the 19th century and just choosing the names of stuff that was there before as part of a nation-building process? I mean, when the Serbs rebelled and became the Kingdom of Serbia, was this less them wanting to free Serbia, and more just a bunch of people rebelling against the Ottomans, and then saying "oh, this area was once the Kingdom of Serbia, so we'll call our Kingdom Serbia" and then doubling-down on a national myth as part of a nation-building process?
Slavonia =/= Slovenia and Slovenia wasn't conquered by the Ottomans.