Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
The need of a woman who could not get pregnant for children and the need of the husband for children is considered a permissible need in Shariah which could be resolved by permissible means and methods.
Among these means is to take the sperm of the husband and implant it in the womb of his wife without sexual intercourse.
It is also permissible to take the sperm of the husband and the egg of the wife and fertilize it outside her womb, then this would be put back to the wife’s womb, so both methods are permissible.
The Islamic Fiqh Conference allowed this in its report, and most of scholars allowed it as well.
Allah knows best.