How could the Prophet, sallallaahu ‘alayhi wa sallam, have gained an abundance of wealth if he knew the unseen, as in the verse 7: 188? Please give me a good, satisfying answer, and may Allaah help you to do so.
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
The knowledge of the worldly benefits and their places and means of acquiring them is considered a helpful means to gain such benefits, Allah willing. If he had known the fertile and infertile lands and the places where prices were high or low and places where gold, silver, and gems were available, he would have gained an abundance of wealth, Allah willing.
Tafseer Al-Baghawi reads:
"Ibn 'Abbaas, may Allah be pleased with him, said, 'The people of Makkah said, 'O Muhammad, does your Lord not inform you about low prices before they go up, and thus you buy and make profit? And does He not inform you about the land that is about to suffer drought and, thus, you travel to a land that is more fertile?' So, Allah, The Exalted, revealed this verse: {Say: I hold not for myself [the power of] benefit or harm, except what Allah has willed. And if I knew the unseen, I could have acquired much wealth, and no harm would have touched me. I am not except a warner and a bringer of good tidings to a people who believe.} [Quran 7:188] It means: Had I knowledge of the Unseen and had I known the timing of droughts, lack of harvest, and the rise in prices, I would amass good in abundance. The verse goes on, (and no harm would have touched me) means that evils, poverty, and hunger would have never touched me. If I had the knowledge of the Unseen, I would have prepared for the years of famine during the prosperous years, and in the time of high cost, I would have prepared for it.'"
Allah knows best.
You can search for fatwa through many choices