See, I am setting before you today a blessing and a curse: the blessing, if you obey the commandments of the Lord your God, which I command you today, and the curse, if you do not obey the commandments of the Lord your God, but turn aside from the way that I am commanding you today, to go after other gods that you have not known.
Israel was given this two sided admonition at the reception of the covenant at Sinai. God promised to bless their commitment to obey the covenant. There would be joy, security, and provision in their obedient worship. And that was good.
But God also explained that the covenant was built with curses for disobedience. If they chose to turn from the Law, their hearts following idols, then the curses of pain, instability, famine, and war would fill their lives. And those curses were designed to call them back to loving God and obeying the covenant.
It is interesting in this text to see that the major curse would come because in their disobedience they would turn to false gods. We cannot disobey God and not worship something else in the process. Sin is in all ways a belief and trust in something, even our own selves, above God. And that idolatry for Israel was a violation of the first commandment to love Him with all their heart, mind, and strength.