Two types of sukkos
למען ידעו דרתיכם כי בסֻכות הושבתי את-בני ישראל בהוציאי אותם מארץ מצרים אני יקוק אלקיכם
In order that your generations shall know that I placed the Jewish people in sukkos, when I took them out of the land of Egypt; I am Hashem your G-d
The verse explaining the purpose of dwelling in sukkos has an anomaly. The word סֻכות is written in full, instead of more the concise סֻכֹת, as it’s spelled when the Torah actually commands us to dwell in them. Why is this so? This is to hint to the two opinions as to which kind of sukkos we are meant to recall when we dwell in our personal sukkos. One opinion focuses on the fact that the Jews were surrounded by Hashem’s Clouds of Glory during their travels in the wilderness. We are to recall this (temporary) Divine shelter by dwelling in our temporary sukkos. The other opinion is that the Jews themselves dwelled in temporary huts called sukkos, during their battles in the land of Sichon and Og . If the word סכת was written concisely, it would look like it’s referring to one sukkah. Written out in full refers to multiple sukkos, and thus alludes to these two opinions.
However, we still could remain skeptical. Maybe really only one of the opinions is being referred to in the verse. Is there anything forcing us to say it’s referring to both opinions? Furthermore, according to the second opinion, why should we have to recall that the Jews dwelled in physical booths known as sukkos? The battle itself is worthy of recollection and gratitude, that we miraculously were able to defeat our enemies unscathed. Who cares what kind of shelter the Jews dwelled in at that time?
We can answer these questions by answering another. A famous question that is asked during the festival of Sukkos is that we are taught that the Jews experienced three tremendous miracles during their journeys in the wilderness. Every day munn rained from the heavens and sustained them. There was a well of water that travelled with them. Finally, as mentioned before, they were surrounded by Hashem’s Clouds of Glory. This cloud protected them from the elements, providing them a perfect environment to live and travel in. According to the first opinion, that Sukkos is to commemorate the Clouds of Glory, why wasn’t the festival enacted in appreciation of the other miracles? The miracles of the munn and the well are no less deserving of their own festival.
An answer is that the munn and the well were completely necessary miracles. The Jews traveled in the wilderness for forty years without any provisions. They needed food and water to survive. Hashem so to speak had to provide these miracles for them. However, the miracle of the Clouds of Glory was in a sense, superfluous. They could have survived without the perfect climate and protection from outside forces. This gift was solely because of Hashem’s relationship with His people. This extra miracle is deserving of its own festival, and became what is today known as Sukkos.
Now, how do we know that the Jews could have survived without the Clouds of Glory? There were many dangerous animals in the wilderness, including snakes and scorpions. The Clouds of Glory protected them from all threats, including these. Maybe they would have been in mortal danger without the Clouds protecting them. We see from their battles in the lands of Sichon and Og that this is not so. During this time, they fought with their enemies, and lived in simple sukkos. They had no Divine protection in the form of the Clouds of Glory, and survived just fine. This shows that the miracle of the Clouds of Glory was an extra gift from Hashem.
Now we can definitely see how the verse writing סוכות in full can allude to both types of sukkos. Each one reveals something about the other, and the two cannot be separated. The Jews being surrounded by the Clouds of Glory is a unique miracle deserving of its own festival. In what way was it unique? It was totally superfluous. The Jews could have survived just fine without them. We know this from the regular sukkos that the Jews dwelled in during their battles against Sichon and Og. These sukkos show that it was possible for them to survive without the Clouds of Glory. This was not the case with the munn and the well of water, which gave them the necessary sustenance to survive in the wilderness.
 Based on Toras Moshe I parshas HaAzinu LeChag HaSukkos s.v. למען ידעו (p. 77)
 Leviticus 23:43
 Ibid v. 42
 The Chasam Sofer writes this question from the Chayei Adam § 146
 Sukkah 11b
 The Chasam Sofer states this as a fact, even though the gemarra doesn’t mention this last point. The earliest source for this I found is Sefer Rokeach § 219, citing יש מפרשים, brought by the Eliyah Rabbah 625:1. The Chasam Sofer himself cites this Eliyah Rabbah in Derashos I p. 52 col. 3 s.v. כל האזרח
 I’m not entirely sure why they were dwelling in sukkos during this time. We are taught that when Aharon died (Numbers 20:22-29), the Clouds of Glory dissipated (Rosh Hashanah 3a (brought by Rashi to Numbers 21:1), Ta’anis 9a, Bamidbar Rabbah 19:20, and Midrash Tanchuma Chukas § 18. For other sources see Torah Sheleimah to Numbers Chapter 20 § 203, Chapter 21 § 1,6,10). However, Ta’anis teaches that the clouds returned in the merit of Moshe. Perhaps they hadn’t returned yet when they fought in the lands of Sichon and Og, which began shortly after (Numbers 21:21-35), and they needed shelter. Still not clear why there would be a delay, nor what or when would be the trigger to bring them back
 According to the words of the gemarra, which doesn’t mention Sichon and Og, this is still a valid question. See Be’er Yosef to Leviticus 23:42-43 § 3 for one explanation, and Aruch HaShulchan 625:3 for another
 Although this question is asked by many, the Chasam Sofer in particular quotes this from “Birkas Yosef”, but I was unable to discover who he was referring to
 Ta’anis loc. cit.; Bava Metzia 86b