Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:39:4

If Allah had intended to take a son, He could have chosen from what He creates whatever He willed. Exalted is He; He is Allah, the One, the Prevailing.  

Had God wanted to take a son — as they allege ˹that He has˺, ‘The Compassionate One has taken ˹to Himself˺ a son’ ˹Q. 19:88˺, He could have chosen from what He has created whatever He willed, and taken it as a child, instead of the angels whom they claim to be God’s daughters, or ˹their claim˺ that ‘Ezra is the son of God’, or that ‘Jesus is the son of God’ ˹cf. Q. 9:30˺. Glory be to Him, in exaltation of Him as being above that He should take a child. He is God, the One, the All-Compelling, over all His creatures.
القرآن:٣٩:٤

لَوْ أَرَادَ اللَّهُ أَنْ يَتَّخِذَ وَلَدًا لَاصْطَفَىٰ مِمَّا يَخْلُقُ مَا يَشَاءُ ۚ سُبْحَانَهُ ۖ هُوَ اللَّهُ الْوَاحِدُ الْقَهَّارُ  

{لو أراد الله أن يتخذ ولدا} كما قالوا: (اتخذ الرحمن ولدا) {لاصطفى مما يخلق ما يشاء} واتخذه ولدا غير من قالوا الملائكة بنات الله وعزير ابن الله والمسيح ابن الله {سبحانه} تنزيها له عن اتخاذ الولد {هو الله الواحد القهار} لخلقه.