أَمْرٌ بِمَعْرُوفٍ is calling people toward good, while نَهْيٌ عَنْ مُنْكَرٍ is discouraging what is wrong. Both require sound understanding, tact, kindness, and attention to circumstances.
If a friend begins spreading an unverified accusation, a private and gentle correction may help. Humiliating someone publicly or making unsupported allegations is not sincere counsel.
بِمَعْرُوفٍ contains the preposition بِ, while عَنْ مُنْكَرٍ contains عَنْ. These express different relationships: calling to good and discouraging wrong.