These verses mention 40 places that the Israelites camped on their way from Egypt to Moab before crossing the Jordan River. It does not included all the places that are recorded in the book of Exodus.
For the Israelites it was more than just a list of places it was a reminder that God had guided them on their journey. They had escaped from Egypt and for 40 years had traveled through the wilderness to the Promised Land. They were able to achieve this because it was God’s plan for them, His people. Throughout their journey God had provided for them and protected them from their enemies. The Israelite people knew that God was with them always.
The Israelites were on the border of the Promised Land across from the town of Jericho. They were making preparations to cross over. God now gave Moses the exact instructions as to how they were to do this.
The Israelites were to force the Canaanites to leave. The Israelites had to destroy all the idols that were in Canaan. Altars were built to the Canaanites false gods and they were to be destroyed too. This was important so that the Israelite people would not fall into idol worship. The Moabites had persuaded the Israelites to worship their false gods before and God did not want this to happen again. Therefore the Canaanites had to leave and all altars and false gods had to be destroyed. Then the land had to be divided amongst the tribes as God had ordered them. (Numbers 26:53-56)
The Israelites did not obey God completely. They did not force al the inhabitants of the land of Canaan to leave. And they eventually persuaded the Israelites to worship their gods. Many centuries later God punished them by allowing their enemies to take them as prisoners to a land far away called Babylon.