And it will be righteousness for us, if we are careful to do all this commandment before the Lord our God, as he has commanded us.
As beautiful as the relationship of saving care was in the Old Testament, it was also deadly serious when it came to God's Law. God rescued Israel from Egypt and brought them into a fertile and wonderful land as their inheritance. He blessed them with His presence, with the means for worship of Him, and with the clarity of the thorough legal code. Israel under the covenant of the Law was bound to obey God and was promised clear blessing when they did so. Obedience to the Law brought righteousness before God and bountiful blessings from His hand.
God provided the measures for this righteousness in the Law. He also provided the means for it through all the clear commands. He established a priesthood, atoning sacrifices, proper worship, practices of holiness, and unique distinctives for His covenant people that set Israel apart as His chosen people, destined to bring glory to the name of their God. This was how God was making Himself known in the revelation of His Word, the worship of His people, and His provision for those in covenant with Him. It was really a beautiful work of God. It was also incredibly hard for sinners to obey all of it.
Each new generation had the serious responsibility of owning the story of the covenant, committing to it, believing God, and passing it on to the next generation. That's one of the features early in the book of Deuteronomy. It challenges parents to instruct their families well in the details of the Law and most importantly, in the "why" behind the obedience. They had to appreciate God's saving history of the nation, commit to obey the law in the present life of the nation, and to faithfully equip the future generation to do the same for the safety and prosperity of the nation. And in the duty hung the success or failure of an entire people group. When Israel failed God, this did not happen. When the people turned to God, it did.