(Exodus 31:18) "And He gave to Moses when He finished." Rabbi Yohanan said: at first Moses would learn Torah and forget it, until it was given to him as a gift, as it says, "and He gave to Moses when He finished."
Why Moses Forgot the Torah Until It Was Given as a Gift
Yalkut Shimoni on Torah 391:5
(שמות לא יח) וַיִּתֵּן אֶל מֹשֶׁה כְּכַלֹּתוֹ. אֲמַר רַבִּי יוֹחָנָן. בַּתְּחִלָּה הָיָה מֹשֶׁה לָמֵד תּוֹרָה וּמְשַׁכְּחָהּ, עַד שֶׁנִּתְּנָהּ לוֹ בְּמַתָּנָה שֶׁנֶּאֱמַר וַיִּתֵּן אֶל מֹשֶׁה כְּכַלֹּתוֹ.