How do we understand the Quranic verses in Surah Al-A'raf 188 and Surah Al-Jinn 21 regarding the matter of knowledge of the unseen by the Prophet Muhammad (s)?
Allah only Has the full knowledge of every unseen الغيب and He Grants whomever He likes whatever He likes from the knowledge of the unseen. See Verse 26 and 27 in Sura al-Jinn ( Verse 26 and 27, Sura 72). Allah mentioned in Quran the Prophet Easa used to inform people about what they ate and what they hide in their houses.Sura 3, verse 49.
These are just few examples about knowledge of unseen granted by Allah to His sincere servants.
We should not mix between the Whole unseen which us only with Allah, and the granted unseen by Allah to His sincere servants.
Wassalam.