A man kissed a woman and then came to Messenger of Allah ﷺ and told him of that, so this Divine Inspiration was revealed to the Prophet ﷺ 'And offer Prayers perfectly at the two ends of the day, and in some hours of the night; (i.e. (five) compulsory prayers). Verily, the good deeds remove the evil deeds (small sins) That is a reminder for the mindful.' (11.114) The man said, Is this instruction for me only?' The Prophet ﷺ said, "It is for all those of my followers who encounter a similar situation." (Using translation from Bukhārī 4687)
أَنَّ رَجُلًا أَصَابَ مِنِ امْرَأَةٍ قُبْلَةً فَأَتَى النَّبِيَّ ﷺ فَذَكَرَ ذَلِكَ لَهُ فَأُنْزِلَتْ {أَقِمِ الصَّلَاةَ طَرَفَيِ النَّهَارِ وَزُلَفًا مِنَ اللَّيْلِ إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّيِّئَاتِ ذَلِكَ ذِكْرَى لِلذَّاكِرِينَ} [هود 114] قَالَ الرَّجُلُ يَا رَسُولَ اللهِ إِلِيَّ هَذِهِ؟ قَالَ لِمَنْ عَمِلَ بِهَا مِنْ أُمَّتِي