Cover Your Sins And Don't Expose People's Sins
Avoid sins but if you committed a sin then cover it. Don't tell people about it. Don't boast about it.
Allah is AsSittir. He covers the sins of the ones He loves. He commands sitir. Allah loves to cover your sins. Allah does not love nakedness and nudity in public. Allah wants you to cover your awrah. Our father Adam and mother Hawwa came down to earth with clothing. It is a blessing that Allah sent down clothing to us.
يَٰبَنِىٓ ءَادَمَ قَدْ أَنزَلْنَا عَلَيْكُمْ لِبَاسًا يُوَٰرِى سَوْءَٰتِكُمْ وَرِيشًا ۖ وَلِبَاسُ ٱلتَّقْوَىٰ ذَٰلِكَ خَيْرٌ ۚ ذَٰلِكَ مِنْ ءَايَٰتِ ٱللَّهِ لَعَلَّهُمْ يَذَّكَّرُونَ ﴿٢٦﴾
O children of Adam, We have bestowed upon you clothing to conceal your private parts and as adornment. But the clothing of righteousness - that is best. That is from the signs of Allah that perhaps they will remember. (Surah Al 'Araf)
It is a matter of haya' (modesty) that we don't want to publicize our own sins.
Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "Every one of my followers will be forgiven except those who expose (openly) their wrongdoings. An example of this is that of a man who commits a sin at night which Allah has covered for him, and in the morning, he would say (to people): "I committed such and such sin last night,' while Allah had kept it a secret. During the night Allah has covered it up but in the morning he tears up the cover provided by Allah Himself."
[Al-Bukhari & Muslim].
If you see someone commits a private sin (i.e sin that does not involve the rights of others), you give him a private advice but you don't expose his sins to others.
It was narrated from Ibn `Abbas that the Prophet (ﷺ) said:
“Whoever conceals the (hidden) fault of his Muslim brother, Allah (SWT) will conceal his faults on the Day of Resurrection. Whoever exposes the fault of his Muslim brother, Allah will expose his faults, until (so that) He shames him, due to it, in his (own) house.”
(Sunan Ibn Majah)
It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:
“Whoever covers (the sin of) a Muslim, Allah will cover him (his sin) in this world and in the Hereafter.” (Sunan ibn Majah)
Ibn 'Umar (May Allah be pleased with them) reported:
I heard Messenger of Allah (ﷺ) saying, "A believer will be brought close to his Rubb on the Day of Resurrection and enveloping him in His Mercy, He (SWT) will make him confess his sins by saying: 'Do you remember (doing) this sin and this sin?' He will reply: 'My Rubb, I remember.' Then He (SWT) will say: 'I covered it up for you in the life of world, and I forgive it for you today.' Then the record of his good deeds will be handed to him".
[Al-Bukhari and Muslim].