These groups hoped to drive Austria-Hungary from the Balkans and establish a 'Greater Serbia', a unified state for all Slavic people. It was this pan-Slavic
nationalism that inspired the assassination of Archduke Franz Ferdinand in Sarajevo in June 1914, an event that led directly to the outbreak of World War I. (internet)
==========================================
https://alphahistory.com/worldwar1/nationalism/
Nationalism is an intense form of patriotism or loyalty to one’s country. Nationalists exaggerate the value or importance of their country, placing its interests over those of other countries. Nationalism was a prominent force in early 20th century Europe and became a significant cause of World War I. Many Europeans – particularly citizens of the so-called Great Powers – were convinced of the cultural, economic and military supremacy of their nation. This over-confidence was fuelled by popular culture and the press. The pages of many newspapers were filled with nationalist rhetoric and inflammatory stories, such as rumours about rival nations and their evil intentions. Nationalism could be found in literature, music, theatre and art. Royals, politicians and diplomats did little to deflate nationalism and some actively contributed to it with provocative remarks and rhetoric.
==========================================
A lot of books have been written about nationalism as the cause of the 2 World Wars. I suggest you stop by your library.