ENOfficial
It was narrated that 'Abdullah said: "The Messenger of Allah (ﷺ) said: 'Whoever among you can afford to get married, let him do so, and whoever cannot afford it should fast, for it will be a restraint (Wija) for him."'
Source: sunnah.com
Other translations
Arabic
أَخْبَرَنَا هَارُونُ بْنُ إِسْحَاقَ، قَالَ حَدَّثَنَا الْمُحَارِبِيُّ، عَنِ الأَعْمَشِ، عَنْ إِبْرَاهِيمَ، عَنْ عَلْقَمَةَ، وَالأَسْوَدِ، عَنْ عَبْدِ اللَّهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنِ اسْتَطَاعَ مِنْكُمُ الْبَاءَةَ فَلْيَتَزَوَّجْ وَمَنْ لَمْ يَجِدْ فَعَلَيْهِ بِالصَّوْمِ فَإِنَّهُ لَهُ وِجَاءٌ " .
sunnah.com