The Rebbe advises couples facing challenges in conceiving sons to ensure their marriage did not involve prior commitments to others, to observe family purity laws meticulously, seek forgiveness if necessary, and verify the kashrut of their tefillin and mezuzot.
https://www.torahrecordings.com/rebbe/igroskodesh/014/005/5110