that the Messenger of Allah (ﷺ) said: "For whomever Allah wants good, he gives him understanding in the religion.
Jami` at-Tirmidhi Book 41, Hadith 1