Deuteronomy 32 is the “Song” of which Moses spoke in the previous chapter 31. In it, Moses called heaven and earth to bear witness to the calamities that will befall Israel if it sins — and the ultimate joy that will come with the final deliverance.
Deuteronomy 32:1 Listen, O you heavens and I will speak; and hear, O earth, the words of my mouth. C-MATS
Question: Why did יהוה have the heavens and earth to hear His words and testify against them when they sinned? To testify that he was warning Israel, Moses wanted witnesses that would outlive his and later generations; otherwise, who could reproach the Israelites of the future if they were to deny that they had ever accepted the covenant? Therefore Moses appointed heaven and earth, which are eternal. Furthermore, if Israel acts righteously, the witnesses will come and reward them: “For there shall be a seed of peace; the vine shall give its fruit and the ground shall give its increase and the heavens shall give their dew; and I will cause to inherit אֶת־ remnant of this people אֶת־ all these things.” (Zechariah 8:12). And if Israel acts sinfully, the hand of the witnesses will be upon them first [to inflict punishment upon them]: “And then יהוה anger will be aroused against you and He will shut up אֶת־ the heavens, that there will be no rain and that the land will not yield אֶת־ her fruit;” (Deuteronomy 11:17), and then [the verse continues]: “and you will perish quickly from off the good land which יהוה gives you.”-through [the attacks of] the nations. Chumash
Deuteronomy 32:2 My teaching will fall as the rain; אמְרָתי my speech will condense as the dew, as the lightrain upon the tender herb and as the showers upon the grass. C-MATS