Surah Al-Qasas, ayah 14

28:14

وَلَمَّا بَلَغَ أَشُدَّهُۥ وَٱسۡتَوَىٰٓ ءَاتَيۡنَٰهُ حُكۡمٗا وَعِلۡمٗاۚ وَكَذَٰلِكَ نَجۡزِي ٱلۡمُحۡسِنِينَ ١٤

Walammā balagha ashuddahū wastawā ātaynāhu hukman wa'ilman wakadhālika najzil-muhsinīn

And when he attained his full strength and was [mentally] mature, We bestowed upon him judgement and knowledge. And thus do We reward the doers of good.