Towards the end of his long speech, and the reminder of the ten commandments and other aspects of the Law, Moses summed up the consequences for disobedience:
Deuteronomy 28:47–48 If you do not serve the Lord your God with joy and enthusiasm for the abundant benefits you have received, you will serve your enemies whom the Lord will send against you. You will be left hungry, thirsty, naked, and lacking in everything. The Lord will put an iron yoke on your neck, oppressing you harshly until he has destroyed you.
The key here is ‘with joy and enthusiasm’—obedience had to come from the heart.