Allah stated in His book;
{And We inspired to the mother of Moses, “Suckle him; but when you fear for him, cast him into the river and do not fear and do not grieve. Indeed, We will return him to you and will make him [one] of the messengers.” (7) And the family of Pharaoh picked him up [out of the river] so that he would become to them an enemy and a [cause of] grief. Indeed, Pharaoh and Haman and their soldiers were deliberate sinners. (8) And the wife of Pharaoh said, “[He will be] a comfort of the eye for me and for you. Do not kill him; perhaps he may benefit us, or we may adopt him as a son.” And they perceived not. (9)}
[Surah Qasas 7-9]
Look at the details that were given to the “Unlettered” Prophet (may Allah’s peace and blessing be upon him). How did he (may Allah’s peace and blessing be upon him) know all of this and that which came after it? Please go in the Quran, read this section for yourself along with the verses that come after it. Then, I want you to ponder over where could this inform could have possibly come from, if not from Allah, Al Lateef, Al Khabeer.
May Allah increase us all in beneficial knowledge Allahuma Ameen.