Narrated
Anas bin Malik رَضِي اللهُ عَنْهُ:
The Prophet صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ said, “Allah has appointed an angel in the womb, and the angel (i.e. of semen), O Lord! a clot, O Lord! a piece of flesh.’ And then, if Allah wishes to complete the child’s creation, the angel will say. ‘O Lord! A male or a female? O Lord! wretched or blessed (in religion)? What will his livelihood be? What will his age be?’ The angel writes all this while the child is in the womb of its mother.”
(Sahih
Bukhari, Vol 4, The Book of Prophets, Hadith 8, Translated by Muhsin Khan)
Source:
Imam Bukhari Centre Liverpool
https://markazbukhari.com