These verses are from the “Song of Moses” and represent God’s declaration to punish Israel. Note however in verses 26-27 God reverses Himself and cancels the just punishment of Israel and decides instead to punish Israel’s enemies so as to vindicate Israel (verses 28-42)
As always when studying the scriptures context is everything (CIE).
bfl
Indeed Hell glorifies God, it shows His Holiness, His justice and His mercy ..