Militarism is the belief in or reliance on the military for achieving national goals and maintaining a strong defense. It often involves prioritizing military power and readiness over diplomatic solutions, leading to an arms buildup and a culture that glorifies military values and service. In extreme forms, militarism can influence a country's politics and society, promoting aggressive foreign policies and the normalization of military presence in everyday life.
When countries join together, they form an alliance. Alliances can be for trade, militrism and other things etc.
The major cause of the Great War was the assassination of Archduke Franz Ferdinand of the Austro-Hungarian Empire in June, 1914, by Gavrilo Princip, a Serbian nationalist. The underlying causes of WWI were nationalism, a form of extreme patriotism and the desire to have independence among the Balkan territories; Imperialism, the desire to take over or gain control of other areas in the world; militarism, the arms race between the major powers; and the Alliance System that was military and defensive which drew all the major powers into the conflict because of their treaties with each other.