مُسْنَدُ أَحْمَدَ
Musnad Ahmad 4085
Musnad of Abdullah bin Mas'ood
It was narrated that ‘Abdullah said: The Messenger of Allah (ﷺ) said to us: "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."
Musnad Ahmad 4112Its isnad is saheeh, al-Bukhari (5066) and Muslim (1400)]