Al-Anbiyaa • EN-TAFSIR-MAARIF-UL-QURAN
﴿ وَزَكَرِيَّآ إِذْ نَادَىٰ رَبَّهُۥ رَبِّ لَا تَذَرْنِى فَرْدًۭا وَأَنتَ خَيْرُ ٱلْوَٰرِثِينَ ﴾
“AND [thus did We deliver] Zachariah when he cried out unto his Sustainer: “O my Sustainer! Leave me not childless! But [even if Thou grant me no bodily heir, I know that] Thou wilt remain when all else has ceased to be!””
Commentary Sayyidna Zakariyya (علیہ السلام) wished for a son and heir for which he prayed to Allah. But at the same time he made it clear that Allah is the best heir no matter if he had a son or not وَأَنتَ خَيْرُ الْوَارِثِينَ. You are the best of inheritors - 21:89). This was the manifestation of the prophetic respect in that the main concern of the prophets should always be toward Allah Ta’ ala, and even if someone else came into focus, their attention should not deviate from the main objective.