The Israelites had to go around the territory of Edom, so when they left Mount Hor, they headed south toward the Red Sea. But along the way, the people became so impatient
Now listen, Moses! The Amalekites and the Canaanites live in the valleys of Canaan. And tomorrow morning, you'll need to turn around and head back into the desert toward the Red Sea.
The Israelites left Mount Hor and headed toward Moab. Along the way, they camped at Zalmonah, Punon, Oboth, Iye-Abarim in the territory of Moab, Dibon-Gad, Almon-Diblathaim, at a place near Mount Nebo in the Abarim Mountains,
A little later, the Israelites set out into the desert, going east of Edom and Moab, and camping on the eastern side of the Arnon River gorge. The Arnon is the eastern border of Moab, and since the Israelites didn't cross it, they didn't even set foot in Moab.