Here the Ethnic map of the former-Yugoslavia from 1981, despite some violent changes (in Croatia, Bosnia and Kosovo) it is mostly the same now (but less mixed). You can see that there are a lot of nationalities in the former-Yugoslavia. Note that Croatians and Slovenians are mostly Catholic. Serbs, Montenegrins and Macedonian are mostly Orthodox and Albanese and “Bosnians” are mostly Muslim.

This difference is caused by the divorce of the Roman Empire and that Bosnia, Serbia, Macedonia and Albania where part of the Ottoman Empire  for several centuries. Croatia, Slovenia and a part of Bosnia where part of the Austrian-Hungarian empire.