Sure Al-Hujuraat

49:6

يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓا۟ إِن جَآءَكُمْ فَاسِقٌۢ بِنَبَإٍۢ فَتَبَيَّنُوٓا۟ أَن تُصِيبُوا۟ قَوْمًۢا بِجَهَٰلَةٍۢ فَتُصْبِحُوا۟ عَلَىٰ مَا فَعَلْتُمْ نَٰدِمِينَ

O die ihr glaubt, wenn ein Frevler zu euch mit einer Kunde kommt, dann schafft Klarheit, damit ihr (nicht einige) Leute in Unwissenheit (mit einer Anschuldigung) trefft und dann über das, was ihr getan habt, Reue empfinden werdet.

Tafsir 49:6

O those who have faith in Allah and act upon whatever He legislates! If a wrongdoer brings some news about a group of people to you, then verify the truth of that news and do not hasten towards accepting it, in fear that if you accept it without verifying it, you could harm a group of people ignorantly. Then after having harmed them, you will regret it when the falsehood of the news becomes clear to you.