In Islam, it is every Muslim has to advise others as narrated in Hadith The Prophet (ﷺ) said, “The deen (religion) is naseehah (advice, sincerity).” We said, “To whom?” He (ﷺ) said, “To Allah, His Book, His Messenger, and to the leaders of the Muslims and their common folk.” [Muslim].
That is in line with the Quran verse
” كُنتُمْ خَيْرَ أُمَّةٍ أُخْرِجَتْ لِلنَّاسِ تَأْمُرُونَ بِالْمَعْرُوفِ وَتَنْهَوْنَ عَنِ الْمُنكَرِ وَتُؤْمِنُونَ بِاللَّهِ “
“You are the best nation produced [as an example] for mankind. You enjoin what is right and forbid what is wrong and believe in Allah. “(3:110)
That shows how important is the role of advising in Islam because sometimes people need someone to give them pure advice with integrity, better than cheering up people in wrongdoing just not to make them feel uncomfortable and let them keep doing wrong.
But at the same time as Islam is a religion of balance approach, advice to a person should be balanced and not base on personal benefit, it should be controlled by wisdom
ادْعُ إِلَىٰ سَبِيلِ رَبِّكَ بِالْحِكْمَةِ وَالْمَوْعِظَةِ الْحَسَنَةِ ۖ وَجَادِلْهُم بِالَّتِي هِيَ أَحْسَنُ ۚ إِنَّ رَبَّكَ هُوَ” أَعْلَمُ بِمَن ضَلَّ عَن سَبِيلِهِ ۖ وَهُوَ أَعْلَمُ بِالْمُهْتَدِينَ
“Invite to the way of your Lord with wisdom and good instruction, and argue with them in a way that is best. Indeed, your Lord is most knowing of who has strayed from His way, and He is most knowing of who is [rightly] guided. (16:125)”
Today it seems people forgot that and if they see a person doing wrong they jump on him or her ordering and talking with authority in public. that is against Islam unless the action has a public domain effect and that role is left to people with knowledge and not the General public. as one of the great scholars Ibn Rajab said “the habit of our self ( first generations Muslim) If someone wanted to advise someone, they would preach it in secret. Some of them even said: Whoever advises his brother between them than it is truly advised, and who did in public than it is blame and not advice .”
advising in public have the worst result as Ibn Masoud RA said: “ that hearts have desires, good times and it also has hate and bad times, so select the good times for best benefit “ and sure advice in public in front of people will result in embarrassment and have a negative effect.
Finally, a Muslim should be wise to know when and who and how to advise and in privacy. So the advice doesn’t become an insult or sign of authority.