As an old man David is able to review His experience of salvation. He knows that it is all of God. He has learnt that no matter what life throws at you we are secure in God. The Saved life is not dormant or moribund, it is a daily experience of God.
39 The salvation of the righteous is from the Lord;
he is their stronghold in the time of trouble.
40 The Lord helps them and delivers them;
he delivers them from the wicked and saves them,
because they take refuge in him.
Psalm 37:39-40 English Standard Version (ESV)