Allah's Messenger (ﷺ) said, "Whoever can guarantee (the chastity of) what is between his two jaw-bones and what is between his two legs (i.e. his tongue and his private parts), I guarantee Paradise for him."
Sahih al-Bukhari Book 81, Hadith 63