Sahih al-Bukhari 5066
Narrated ‘Abdullah: We were with the Prophet (ﷺ) while we were young and had no wealth. So Allah’s Messenger (ﷺ) said, "O young people! Whoever among you can marry, should marry, because it helps him lower his gaze and guard his modesty (i.e. his private parts from committing illegal sexual intercourse etc.), and whoever is not able to marry, should fast, as fasting diminishes his sexual power."
Markdown Format
> Narrated 'Abdullah: We were with the Prophet (ﷺ) while we were young and had no wealth. So Allah's Messenger (ﷺ) said, "O young people! Whoever among you can marry, should marry, because it helps him lower his gaze and guard his modesty (i.e. his private parts from committing illegal sexual intercourse etc.), and whoever is not able to marry, should fast, as fasting diminishes his sexual power." > > —[Sahih al-Bukhari 5066](https://sunnah.com/bukhari:5066)