Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:24:30

Tell the believing men to reduce ˹some˺ of their vision and guard their private parts. That is purer for them. Indeed, Allah is Acquainted with what they do.  

Tell believing men to lower their gaze, from what is unlawful for them to look at (min ˹of min absārihim, ‘their gaze’˺ is extra) and to guard their private parts, from doing with them what is unlawful ˹for them to do˺. That is purer, in other words, better, for them. Truly God is Aware of what they do, with their gazes and private parts, and He will requite them for it.
القرآن:٢٤:٣٠

قُلْ لِلْمُؤْمِنِينَ يَغُضُّوا مِنْ أَبْصَارِهِمْ وَيَحْفَظُوا فُرُوجَهُمْ ۚ ذَٰلِكَ أَزْكَىٰ لَهُمْ ۗ إِنَّ اللَّهَ خَبِيرٌ بِمَا يَصْنَعُونَ  

{قل للمؤمنين يغضوا من أبصارهم} عما لا يحلُّ لهم نظره، ومن زائدة {ويحفظوا فروجهم} عما لا يحل لهم فعله بها {ذلك أزكي} أي خير {لهم إن الله خبير بما يصنعون} بالأبصار والفروج فيجازيهم عليه.