Az-Zumar 39:18
ٱلَّذِينَ يَسْتَمِعُونَ ٱلْقَوْلَ فَيَتَّبِعُونَ أَحْسَنَهُۥٓ ۚ أُو۟لَـٰٓئِكَ ٱلَّذِينَ هَدَىٰهُمُ ٱللَّهُ ۖ وَأُو۟لَـٰٓئِكَ هُمْ أُو۟لُوا۟ ٱلْأَلْبَـٰبِ
Allatheena yastamiAAoona alqawlafayattabiAAoona ahsanahu ola-ika allatheenahadahumu Allahu waola-ika hum oloo al-albab
Who listen to speech and follow the best of it. Those are the ones Allāh has guided, and those are people of understanding.
who listen to what is said, then, follow the best of it. Those are the ones whom Allah has guided, and those are the ones who possess understanding.