Allah Ta'ala has granted us the Holy Quran through the Holy Prophet (Sallallahu alaihi wa sallam). The Holy Quran is the fountainhead of all guidance and a comprehensive book of all sciences, in which all that will happen until the Qiyamah, all the information about the beginnings and the end of the world and the solution for all problems of every aspect of life is present. As Allah Ta'ala says in Surah Anaam-38.
Allah Ta'ala has mentioned the comprehensiveness and boundlessness of the sciences in the Holy Quran in Surah Younus-37.
The Holy Quran describes everything. There are a total of 77450 words in the Holy Quran and from each word, a fountain of knowledge is gushing forth.
Hadhrat Imam Suyuti (May Allah shower His mercy on him) relates that Allama Qazi Abu Bakr Ibn Arabi (May Allah shower His mercy on him) said: Every letter of the Holy Quran has 4 dimensions: The outward, the inward, a beginning and an end. Every letter of the Holy Quran has 4 kinds of knowledge in it with these 4 dimensions. In light of this, the Holy Quran has 309800 sciences. For this reason, Hadhrat Abdullah Bin Abbas (May Allah be well pleased with him) said: Even if the halter (rope) of my camel is lost, I will find it in the Book of Allah.
Allah Ta'ala has granted absolute knowledge about all the sciences of the Holy Quran, which encompasses all outward and inward knowledge and all laws and rules to the Holy Prophet (Sallallahu alaihi wa sallam) and has made Him a teacher ( Mu’allim ) of this great book and has sent to the whole universe. As Allah Ta'ala says in Surah Rahman 1-2.
If someone says that the Holy Prophet (Sallallahu alaihi wa sallam) does not know this, then that person is not raising an objection on the knowledge of the Holy Prophet (Sallallahu alaihi wa sallam), but on the Holy Quran itself that the Holy Quran is imperfect and even on Allah Ta'ala Himself that He sent someone who does not have complete knowledge of the Holy Quran and the reality is that the Holy Quran is flawless and the selection of the Allah Ta'ala is also flawless.
With the knowledge gained from the court of Allah Ta'ala, the Holy Prophet (Sallallahu alaihi wa sallam) has informed us of all that will happen until the Day of Judgment, made us aware of Jannah, Hell, Barzakh (the netherworld between this world and the Aakhirah), Aakhirah, judgment and everything else. There is a Hadith in Sahih Bukhari:
Translation of Hadith: The Holy Prophet (Sallallahu alaihi wa sallam) came among us to give a sermon and He described the reality of beginning of the universe (creation) to when the people of Jannah will go into Jannah and the people of Hell will go into Hell. (Sahih Bukhari, Hadith No. 3192)
There is a Hadith in Sahih Muslim on the authority of Hadhrat Abu Zaid ‘Amr Bin Akhtab (May Allah be well pleased with him):
Translation of Hadith: The Holy Prophet (Sallallahu alaihi wa sallam) led the Salaat Ul Fajr, then graced the pulpit and spoke to us until the time for Salaat Ul Zuhr came, then He (Sallallahu alaihi wa sallam) led the Salaat Ul Zuhr, then graced the pulpit and spoke to us until the time for Salaat Ul ‘Asr came, then He (Sallallahu alaihi wa sallam) performed Salaat Ul ‘Asr, graced the pulpit and spoke to us until the sun set. He (Sallallahu alaihi wa sallam) gave us detailed information about what has happened and what will happen. (Sahih Muslim, Hadith No. 7449)