The Prophet ﷺ said, "Women are married for four reasons, for their wealth, their lineage, their beauty, and their religion. So choose the religious one and you will prosper."
أخبرنا عبيد الله بن سعيد قال حدثنا يحيى عن عبيد الله عن سعيد بن أبي سعيد عن أبيه
عن النبي ﷺ قال تنكح النساء لأربعة لمالها ولحسبها ولجمالها ولدينها فاظفر بذات الدين تربت يداك
Muslim, Rida, chapter titled "The desirability of marrying a religious woman," hadith no. 53/1466, from Ubaydullah, through it, Qattan Ibn Saeed, and Bukhari, Nikah, chapter titled "Compatibility in religion," hadith no. 5090, from the hadith of Yahya, and it is also in al-Kubra, hadith no. 5337.