From Sahih Bukhari (Hadith 6474):
Narrated Sahl bin Sa`d: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
Reference: Bukhari 6474