Surah An-Nisaa

4:86

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

And when you are greeted with a greeting, greet [in return] with one better than it or [at least] return it [in a like manner]. Indeed, Allah is ever, over all things, an Accountant.

Tafsir 4:86

When anyone offers a greeting of peace to you, then respond to him with something better than what he offered or return a similar greeting to him. To respond with something better is more virtuous. Allah keeps watch over what you do and He will reward each person according to his actions.