Surah Al-Qasas

28:44

وَمَا كُنتَ بِجَانِبِ ٱلْغَرْبِىِّ إِذْ قَضَيْنَآ إِلَىٰ مُوسَى ٱلْأَمْرَ وَمَا كُنتَ مِنَ ٱلشَّٰهِدِينَ

And you, [O Muhammad], were not on the western side [of the mount] when We revealed to Moses the command, and you were not among the witnesses [to that].

Tafsir 28:44

O Messenger! You were not present on the western side of the mountain from Moses’s perspective, when I completed the matter of sending Moses as a Messenger to Pharaoh and his people. You were not present to know of that incident so you could relate it to people, so what you do relate to them is only due to Allah’s revelation to you.