22 So Moses wrote down this song that day and taught it to the Israelites.

Read Deuteronomy 31:22 Using Other Translations

Moses therefore wrote this song the same day, and taught it the children of Israel.
So Moses wrote this song the same day and taught it to the people of Israel.
So that very day Moses wrote down the words of the song and taught it to the Israelites.