- Status : FABRICATED, but meaning OK
The following statement is spread as a hadith namely that :
“He who knows himself, knows Allah”
These words have been deemed as a fabrication, and not a Hadith of Rasulullah ﷺ by several Hadith masters like ‘Allamah Nawawi and Hafiz Ibn Taymiyyah (rahimahumullah)
These words are actually attributed to the famous Shaykh, Yahya ibn Mu’adh Ar- Razi (rahimahullah), and may be quoted as such.
Thus, the broader meaning is indeed correct, as one who ponders over the wisdoms of Allah Ta’ala’s creation, can definitely understand His Greatness. There are several such encouragements in the Quran for us to ponder over such. This however, does not warrant us attributing these words to Rasulullah ﷺ.
Al-La’âlil Manthûrah, hadith: 100,
Al-Maqâsidul Hasanah, hadith: 1149
Kashful Khafâ, hadith: 2532
Source 1 (post copy-pasted from there)