Chazal say, “Everything is in Heaven’s hands, except for yiras Shamayaim.” The Rebbe of Kotzk zt’l explains that when one prays for material matters, Heaven decides whether it is good for him to receive this or not. But when one prays for Torah,
mitzvos, and yiras Shamayim, his requests are always answered, because
that is unquestionably a good thing.
Chazal hint to this when they say, everything is up to Heaven to decide whether to give it or not, the exception is when one prays for yiras Shamayim, because Hashem will certainly give it to him. ~ R’ Elimelech Biderman, Shlita