From Chabad.org: The Jews approach the land of the Emorites, which lies on the east bank of the Jordan River. They send a message to Sichon, king of the Emorites, asking permission to pass through his land en route to Canaan. Sichon refuses and instead masses his armies and attack the Jews. The Jews are victorious and occupy the Emorite lands. Og, king of Bashan, then attacks the Jews. The Jews are triumphant again; they kill Og and occupy his land too. Now the Jewish nation has reached the bank of the Jordan River, just across from the city of Jericho in the land of Israel.
Sichon was the bully of the region, having wrestled the strategic city of Cheshbon from Moav. When the Jews neared, though, Sichon inexplicably (unless you realize it’s all G-d’s work) took every warrior out of the city to go fight the Jews. Apparently he didn’t learn the lesson from the previous army that attempted to fight the Jews for no reason. The Jews just wanted to pass through, but instead were forced to fight and win the land. Once they settle in the newly acquired land, Moshe sends spies to Ya’azer, and the spies themselves end up conquering the land (no need for armies or confrontations when you’re on a roll). Then they head north to Bashan, and once again the leader comes at the Jews in battle, and once again loses (this time 120-year-old Moshe gets involved the fighting, as the Gemara describes how he lifted an entire mountain and dropped it on the enemy).
I’m not sure what there is to learn from all this fighting, other than sometimes people attack the Jews for no good reason other than maybe feeling threatened, and we have to have faith that we have G-d on our side, looking out for us.