The Verse 188 clears away a common misbelief of the people regarding the prophets of Allah. They thought that the prophets must possess the knowledge of each and everything in the universe, including the knowledge of the unseen future and unknown past. Similarly, they thought that the prophets must possess the power of bringing benefit or harm to any one out of their own will. The verse made it clear that the all-encompassing knowledge is an exclusive attribute of Allah which cannot be ascribed to any created being. Ascribing these exclusive attributes to anyone other than Allah is the greatest transgression and is tantamount to associating partners with Allah. The very purpose of the revelation of the Holy Qur'an and the advent of the Holy Prophet ﷺ has been to eliminate all the traces of plurality of god and to establish the purest unity of Allah (Tauhid).
The Holy Prophet has been asked to declare that, not to speak of others, even he was unable to harm or benefit himself and that he did not possess the knowledge of the unseen. Had he possessed such knowledge, he would have stored all the good for himself and would have saved himself from every possible harm. There are evident instances in which the Holy Prophet ﷺ could not achieve his objectives inspite of all his effort, and in many other instances, he could not save himself from the damages and harm that reached him. The incident of the treaty of Hudaibiyah is an evident example when the Holy Prophet ﷺ and his companions travelled all the way to Makkah in order to perform the ` Umrah but were stopped by the unbelievers of Makkah. Despite all their desire and effort, they had to go back to Madinah without performing ` Umrah. similarly, the Holy Prophet ﷺ was wounded in the battle of Uhud and the Muslims faced temporary defeat.
Perhaps, such events were allowed to happen, so that it may be demonstrated in practical terms that the Prophets, with due regards to their being closest to Allah and being the best of all the human beings, did not possess divine power and encompassing knowledge.
They were human like other human beings. The Christians fell prey to the same error. They ascribed the divine attributes of Allah to their Prophet and went astray.
The Prophets, however, are invested by Allah with as much knowledge and power as no other human being has ever acquired. They Holy Prophet ﷺ was certainly favoured with the degree of knowledge which surpassed the knowledge of all other prophets. He informed the Muslims of many things which were to happen in future. All his foretellings were seen to happen exactly as he had foretold.
We can say that the Holy Prophet ﷺ was given the knowledge of a number of unseen things, but in Qur'anic terminology this is not termed as (the knowledge of the unseen). Therefore, on the basis of this we are not allowed to call the Holy Prophet ﷺ عَالِمُ الغیب (the knower of the unseen), as knower of the unseen is none other than Allah.
The last sentence of the verse said, إِنْ أَنَا إِلَّا نَذِيرٌ وَبَشِيرٌ لِّقَوْمٍ يُؤْمِنُونَ I am but a warner and a harbinger of good for people who believe." That is, he has been assigned the duty of warning the evil doers against the punishment of Allah and give the good tidings of great reward by Allah to those who are righteous.