I have long had misunderstandings about the meaning of the word ‘destroyed’ as it is used about people in the book of Deuteronomy, but verse 4 says that God ‘destroyed’ Sihon and Og, the kings of the Amorites along with their lands, so I have an example of what ‘destroyed’ means there.
Moses then wrote down the law, according to the writer of Deuteronomy and instructed the people to read it every seven years in front of everyone – men, women, children and aliens – so they could learn to fear God and keep his laws. (Deut 31: 10 -13). I certainly agree with the idea that learning God’s law helps you learn to fear and obey him.
God knew that the people were going to turn away from him in the future, so he let Moses know this, but he didn’t throw up his hands and quit. (31: 16 – 18).
Two things were given to the Israelites as a witness against them in case they ever turned away from God – the law was written in a book and places near the ark of the covenant; and Moses taught them a song that God has taught him.