Musnad Ahmad 4035
Grading supplied with this record: Its isnad is saheeh, al-Bukhari (5066) and Muslim (1400)]
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
It was narrated that 'Abdur-Rahman bin Yazeed said:
We entered upon ‘Abdullah, and ‘Alqamah and al-Aswad were with him. He narrated a hadeeth and I think he only narrated it for my sake; I was the youngest of the people. He said: We were with the Messenger of Allah (ﷺ), young men who had nothing. And he said: “O young men, whoever among you can afford it, let him get married, for it is more effective in lowering the gaze and guarding one's chastity. And whoever cannot afford it should fast, for it will be a shield for him."
Full reference and source
Musnad Ahmad 4035 Arabic/English book : Book 26, Hadith 4035
View source on Sunnah.com (opens in a new tab)