Dalil

Quran At-Takwir 81:24

وَمَا هُوَ عَلَى ٱلۡغَيۡبِ بِضَنِينٖ

Translation

And he [i.e., Muḥammad (ﷺ)] is not a withholder of [knowledge of] the unseen.