The Song of Moses in Deut 32:1-47 is a prophetic song at the end of Moses's life, and following his statement in Deut 31:29-30 about Israel's future falling away (though I prefer NKJV, I'll stick with NIV since that is what your question related to, bold added):
29 For I know that after my death you are sure to become utterly corrupt and to turn from the way I have commanded you. In days to come, disaster will fall on you because you will do evil in the sight of the LORD and arouse his anger by what your hands have made.” 30 And Moses recited the words of this song from beginning to end in the hearing of the whole assembly of Israel:
And then the Song follows, which contains an abundance of figurative language. Such language is the case with vv.32-33, which I'll re-quote here from what the question had:
32 Their vine comes from the vine of Sodom and from the fields of Gomorrah. Their grapes are filled with poison, and their clusters with bitterness. Their wine is the venom of serpents, the deadly poison of cobras.
This is a picture from nature. In nature, the vine refers to the source of what nourishes and produces the fruit, and the vine grows from the nutrients of the field's ground it is planted in; the grapes are that fruit (in the case of a grape vine), which emerge in clusters on the vine; and the wine is the processed form of the grape, after it is crushed.
So this is a direct metaphor to say that Israel's ground, its source of life, at this future stage in history that Moses is prophesying about, is corrupted like that of Gomorrah's fields (i.e. Gomorrah's sinfulness), and their vine that nourishes them is corrupt like that of Sodom's (i.e. Sodom's sinfulness)—in short, they have become "utterly corrupt" (per what Dt 31:29 stated). Their source is corrupt, so they are producing fruit (sinful actions) that will bring deadly consequences and abundant (clusters) of bitterness to them—in short, they "will do evil in the sight of the LORD" that will bring "disaster" upon them (per what Dt 31:29 stated). Their fruit is poisoned, that is, their actions will be sinful, and so when that fruit is processed into wine, it becomes an active agent to spread more death—in short, their "hands have made" things that "anger the LORD" (per what Dt 31:29 stated), which things will be more idols (Dt 32:21-22).
Isaiah prophesies of this relation to Sodom later (Isa 3:8-9, bold added):
For Jerusalem stumbled,
And Judah is fallen,
Because their tongue and their doings
Are against the LORD,
To provoke the eyes of His glory.
9 The look on their countenance witnesses against them,
And they declare their sin as Sodom;
They do not hide it.
Woe to their soul!
For they have brought evil upon themselves.
But these prophetic words of Moses and Isaiah come to pass in Jeremiah's day as Israel will soon be judged by Babylon, and the LORD declares through Jeremiah (Jer 23:12) in 23:13-14 (bold added):
Among the prophets of Samaria I saw this repulsive thing: They prophesied by Baal and led my people Israel astray. And among the prophets of Jerusalem I have seen something horrible: They commit adultery and live a lie. They strengthen the hands of evildoers, so that not one of them turns from their wickedness. They are all like Sodom to me; the people of Jerusalem are like Gomorrah.
And so because of this sinful state, the fall of Judah to Babylon and the captivity of Israel comes within Jeremiah's day, with much death and much bitterness because of their poisoned fruits from their corrupt source.