Many wars, especially modern ones, are fueled in part by nationalism, but almost none are caused by nationalism alone or mostly caused by nationalism alone.
Instead, they're driven primarily by other factos: power & security, economic interests, religion or ideology, contorl and authority. Nationalism is often a tool rather than the root cause.
almost all wars are fueled by nationalism