It’s been a while since I’ve seen TNG and maybe my memory’s bad, but the first one that came to mind, Data’s Day, seems to be one that nobody’s yet listed.
For DS9 I have to add the episode where the nagus is reverted by the prophets to a more charitable form and Quark saves the day by meeting with them and managing to be so obnoxious and abrasive that they agree to turn him back just so they never have to deal with another ferengi ever again!