The war of the Aesir and the Vanir is the mythological representation of the conflict in the iron age between the prehistoric agricultural Vanir cult that required sacrifice to maintain the fertility of the land, and the new Aesir gods originating in the near east who represented a more rational paganism resistant to conquest in the warlike bronze age, the Aesir cult venerated linguistics and cunning as well as martial skills. The conflict arose because of pressure on the land brought about by new agricultural practises arising in the bronze age.
But the war broke out because of the dispute between Odin and Freyja, it was a battle within the psyche of Odin. Divination was considered ‘feminine’ magic by the northern people, Odin knew that he would have to become a seer himself if he was to avert the disasters ahead that Freyja prophesied, Odin feared the feminine side, the masculine principle not yet ready to take the step from warrior to seer.
The conflict is resolved by the diplomacy of Odin because he sees reason and knows that both cults are relevant and they become fused.