Passage
For I have kept the ways of the LORD, and have not wickedly departed from my God.
For I have kept the ways of the LORD, and have not wickedly departed from my God.
Psalms 18:19 He brought me forth also into a large place; he delivered me, because he delighted in me.
Psalms 18:20 The LORD rewarded me according to my righteousness; according to the cleanness of my hands hath he recompensed me.
Psalms 18:21 For I have kept the ways of the LORD, and have not wickedly departed from my God.
Psalms 18:22 For all his judgments were before me, and I did not put away his statutes from me.
Psalms 18:23 I was also upright before him, and I kept myself from mine iniquity.
The verse centers on "kept", "ways", "lord", "wickedly", and "departed". It is saying that the verse draws attention to "kept" and "ways", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 20's "The LORD rewarded me according to my..." into verse 22's "For all his judgments were before me...", so "kept" and "ways" belong inside that flow. In Psalms context, the local focus is worship, trust, the LORD's kingship, and covenant mercy.
A plain takeaway is to answer the verse's own emphasis on "kept" and "ways" with trust shaped by these words, not by a vague optimism outside the passage.