Deuteronomy 28 is the climax of Moses' second speech. The covenant had consequences. If Israel listened diligently to Yahweh's voice, blessings would overtake them: in the city and the field, the fruit of the womb and the ground, the basket and the kneading trough, coming in and going out. God would open His good treasure in the sky, give rain in its season, and make Israel the head and not the tail, so all peoples would see they were called by His name.
The curses take up four times as much space. Disobedience would reverse each blessing: the sky would become bronze and the earth iron; disease, defeat, and oppression would follow. The climax is exile. God would scatter Israel among all peoples, where they would find no rest for the sole of the foot. They would even return to Egypt, undoing the exodus.
Verse 47 names the root problem: you didn't serve Yahweh your God with joyfulness and with gladness of heart, by reason of the abundance of all things. History confirmed Moses' warnings in the Assyrian and Babylonian exiles. But Deuteronomy does not end in curse. Chapter 30 promises restoration and a new heart, and Christ bore the curse of the law so that the blessing of Abraham might come to all who believe (Galatians 3:13-14).