David became the most famous man among the Israelites. However, he was not inveigled by this; he was not a prisoner of fame or leadership but a prisoner of Allah's love.
Therefore, after killing Goliath he went out into the desert in the company of nature, glorifying Almighty Allah and contemplating His favors.
Verily, We made the mountains to glorify Our Praises with him (David) in the Ashi (i.e. after the mid-day till sunset) and Ishraq (after the sunrise till mid-day). And (so did) the birds assembled: all with him (David) did turn (to Allah i.e. glorified His Praises). We made his kingdom strong and gave him wisdom and sound judgment in speech and decision. Surah 38: 18-20
Creatures such as the plants, birds, beasts, and even the mountains responded to his voice glorifying Allah. Allah had chosen David to be a prophet and revealed the Psalms to him. As He the Almighty said: ... and to David We gave the Psalms. Surah 17: 55
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 4 : Ayah 163 Surah 11 : Ayah 25 Surah 11 : Ayah 32 Surah 11 : Ayah 36 Surah 17 : Ayah 55 Surah 27 : Ayah 15 Surah 27 : Ayah 16"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari