The following excerpt is taken from “Science in the Quran” by Sayyid Rami Al Rifai chapter 1:

It is clear from the prophet Muhammad’s (saws) own words that He (saws) understood there is knowledge in everything which needs to be studied and discovered before it can be known, today for mankind science fulfils this role. The Prophet – praise and peace be upon him – said, “Indeed, knowledge has a branch which resembles a hidden thing (it needs to be discovered); no one grasps it except those who know Allah.” Allah in the Quran speaks about all aspects of creation, but much of it was beyond the understanding of the desert Arabs living 1400 years ago, Allah says: “And we strike these similitudes for the people, but none understands them except those who know.” (29: 42). Regarding this the prophet (saws) said, “Indeed, there is an external meaning and an internal meaning to the Qur’an, a scope and a point.” Ali, pointing to his breast, said, “Indeed, herein lies abundant knowledge; would that there were some to (comprehend and) transmit it.”   It was because not every person was capable of understanding science that the prophet (saws) said, “We prophets were ordered to communicate with everyone according to his ability to understand.” This is because there was a danger in trying to teach people science they would not be able to prove for another 1400 years, so the prophet (saws) warned, “No one has ever recited a prophetic quotation to a people which their minds have failed to grasp without it being a temptation for them.” The prophet taught the scientific meanings behind specific verses to the companions who could grasp them and they understood the dangers of trying to teach knowledge that could not be visually proven.   Allah said in the Quran, “It is Allah who has created the seven heavens and of (the) earth, their like (meaning the other planets); and between them the Command descends (the Laws of Physics governing space)” (65: 12). Ibn Abbas (r.a) said about this verse, “Were I to relate its interpretation you would stone me” or  “ you would have said, ‘He is an unbeliever’”. Abu Hurrah similarly said, “I have received from the Prophet of Allah two things (types of knowledge), one of which I have made public. Were I to divulge the other, this throat would be cut.”   The prophet  ( saws)   said, “Abu-Bakr has excelled you not by excessive fasting and much prayer, but by a secret which rests in his chest.” His ability to understand science and everything the prophet (saws) taught him about the universe and Allah.   Allah said in the Quran “Say (unto them, O Muhammad): Are those who know equal with those who know not? But only men of understanding will pay heed.” (39: 9)

Al Rifai, Sayyid Rami. Science In The Quran (pp. 1-2). UNKNOWN. Kindle Edition.