God makes us good and leads us triumphantly and successfully and if we continue in His ways, He delights in us.
"The steps of a good man are ordered by the LORD,
And He delights in his way."
Kind David was known as 'a man according to God's own heart', because he followed the Lord with all his heart and soul.
See how David instructs his son Solomon before his death...
"And keep the charge of the LORD your God: to walk in His ways, to keep His statutes, His commandments, His judgments, and His testimonies, as it is written in the Law of Moses, that you may prosper in all that you do and wherever you turn; that the LORD may fulfill His word which He spoke concerning me, saying, 'If your sons take heed to their way, to walk before Me in truth with all their heart and with all their soul,' He said, 'you shall not lack a man on the throne of Israel.'" 1 Kings 2:3-4
While an ordinary shepherd as a young boy, David would never have thought he would go so high, and God lifted him up. The only good thing David did was that he loved the Lord God immensly and thus was called as 'a man according to God's own heart', so that's what God needs from us too...to love Him with all our heart and to walk in His ways perfectly all of our days.