These are the 5 main causes of WWI:
Militarism:
Nations made military power a primary goal. Major powers built up their armies and navies.
Alliances:
Competing alliances bound European nations together. An attack on one nation forced its allies to come to its aid.
Nationalism:
Many Europeans embraced nationalism, strong feelings of pride, loyalty, and protectiveness toward their own countries. They wanted to prove their nations were the best.
Imperialism:
Britain, France, Germany, and Italy competed for colonies in Africa and Asia. Germany had fewer colonies than Britain and France and felt it deserved more colonies.
Assassination:
The assassination of Archduke Franz Ferdinand caused a huge conflict.
I hope this helps you out :).