42:50
أَوْ يُزَوِّجُهُمْ ذُكْرَانًۭا وَإِنَٰثًۭا ۖ وَيَجْعَلُ مَن يَشَآءُ عَقِيمًا ۚ إِنَّهُۥ عَلِيمٌۭ قَدِيرٌۭ
Or He makes them [both] males and females, and He renders whom He wills barren. Indeed, He is Knowing and Competent.
Translation · Saheeh International
Tafsir
Ibn Kathīr (abridged)
Allah tells us that He is the Creator, Sovereign and Controller of the heavens and the earth.
Whatever he wills happens, and whatever He does not will does not happen. He gives to whomsoever He wills and withholds from whomsoever he wills; none can withhold what He gives, and none can give what He withholds, and He creates whatever He wills.
يَهَبُ لِمَن يَشَآءُ إِنَـثاً
(He bestows female upon whom He wills.) means, He gives them daughters only. Al-Baghawi said, "And among them (those who were given daughters only) was Lut, peace be upon him."
وَيَهَبُ لِمَن يَشَآءُ الذُّكُورَ
(and bestows male upon whom He wills.) means, He gives them sons only. Al-Baghawi said, "Like Ibrahim Al-Khalil, peace be upon him, who did not have any daughters."