It was narrated that Ma'qil bin Yasar said: "A man came to the Messenger of Allah and said: 'I have found a woman who is from a good family and of good status, but she does not bear children, should I marry her?' He told him not to. Then he came to him a second time and he told him not to (marry her). Then he came to him a third time and he told him not to (marry her), then he said: 'Marry the one who is fertile and loving, for I will boast of your great numbers.'" (Using translation from Nasāʾī 3227)
جَاءَ رَجُلٌ إِلَى رَسُولِ اللَّهِ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ إِنِّي أَصَبْتُ امْرَأَةً ذَاتَ حَسَبٍ وَمَنْصِبٍ وَمَالٍ إِلَّا أَنَّهَا لَا تَلِدُ أَفَأَتَزَوَّجُهَا؟ فَنَهَاهُ ثُمَّ أَتَاهُ الثَّانِيَةَ فَقَالَ لَهُ مِثْلَ ذَلِكَ فَنَهَاهُ ثُمَّ أَتَاهُ الثَّالِثَةَ فَقَالَ لَهُ مِثْلَ ذَلِكَ فَقَالَ رَسُولُ اللَّهِ ﷺ «تَزَوَّجُوا الْوَدُودَ الْوَلُودَ فَإِنِّي مُكَاثِرٌ بِكُمُ الْأُمَمَ»