Deuteronomy 31:21-23 World English Bible (WEB)
21 It will happen, when many evils and troubles have come on them, that this song will testify before them as a witness; for it will not be forgotten out of the mouths of their descendants; for I know their ways and what they are doing today, before I have brought them into the land which I promised them.”
22 So Moses wrote this song the same day, and taught it to the children of Israel.
23 He commissioned Joshua the son of Nun, and said, “Be strong and courageous; for you shall bring the children of Israel into the land which I swore to them. I will be with you.”