The Prophet ﷺ said, "Women are married for four reasons, their wealth, their beauty, their lineage, and their religion. So choose the one of religion, may your hands be filled with dust."
حدثنا يحيى بن سعيد عن عبيد الله قال حدثني سعيد عن أبيه
عن النبي ﷺ تنكح النساء لأربع لمالها وجمالها وحسبها ودينها فاظفر بذات الدين تربت يداك
Its isnad is sahih. Bukhari related it, 7/9, in the Book of Marriage, chapter on suitability in religion, and Muslim, 2/1086, no. 1466, in the Book of Breastfeeding, chapter on the recommendation of marrying a woman of religious devotion, and Abu Dawud, 2047, in the Book of Marriage, chapter on what is commanded regarding marrying a woman of religious devotion, with his wording, and Ibn Majah, 1/597.