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:2:269

He gives wisdom to whom He wills, and whoever has been given wisdom has certainly been given much good. And none will remember except those of understanding.  

He gives wisdom, that is, the profitable knowledge that leads to ˹righteous˺ action, to whomever He will, and he who is given wisdom, has been given much good, because he will end up in perpetual bliss; yet none remembers (the tā’ of yadhdhakkar has been assimilated with the dhāl), that is to say, ˹none˺ is admonished, but the people of pith, possessors of intellects.
القرآن:٢:٢٦٩

يُؤْتِي الْحِكْمَةَ مَنْ يَشَاءُ ۚ وَمَنْ يُؤْتَ الْحِكْمَةَ فَقَدْ أُوتِيَ خَيْرًا كَثِيرًا ۗ وَمَا يَذَّكَّرُ إِلَّا أُولُو الْأَلْبَابِ  

{يؤتي الحكمة} أي العلم النافع المؤدي إلى العمل {من يشاء ومن يُؤت الحكمة فقد أوتي خيرا كثيرا} لمصيره إلى السعادة الأبدية {وما يذَّكَّر} فيه إدغام التاء في الأصل في الذال يتعظ {إلا أولوا الألباب} أصحاب العقول.