Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:49:18

Indeed, Allah knows the unseen ˹aspects˺ of the heavens and the earth. And Allah is Seeing of what you do.  

Truly God knows the Unseen of the heavens and the earth, that is, ˹He knows˺ all that is hidden in both, and God is Seer of what you do’ (may be read either as ya‘malūna, ‘they do’, or ta‘malūna, ‘you do’), nothing of which can be concealed from Him. Meccan, except for verse 38, which is Medinese; it consists of 45 verses.
القرآن:٤٩:١٨

إِنَّ اللَّهَ يَعْلَمُ غَيْبَ السَّمَاوَاتِ وَالْأَرْضِ ۚ وَاللَّهُ بَصِيرٌ بِمَا تَعْمَلُونَ  

{إن الله يعلم غيب السماوات والأرض} أي ما غاب فيهما {والله بصير بما يعملون} بالياء والتاء لا يخفى عليه شيء منه.