Shaykh Uthaymeen rahimahullah:

He the Prophet (salallahu alaihi wa salam) : “And the good word is a charity” And this, Allah praise is to Allah, is what is general (in regards to a good word being a charity). The good word divides into two groups:

1. Good standing-alone (originally good, its origin is good)

2. Good in its objective.

In regards to the good (words) standing-alone, it is that like dhikr (remembrance): La illaha ila Allah, Allahu akbar, Alhamdulillah, La hawla wala quwata ila billah, and the best of Dhikr is the recitation the Quran.

And in regards to good (words) in its objective is like that speech which is permissible such as you speaking to people intending with these lonely people that they become happy. So verily this speech, although this speech isn’t in its originality good, but it is good in its objective.

Taken from al-Fawaid min Sharh Riyadh as-Saliheen lee Shaykh Uthaymeen