Passage
Before I was afflicted I went astray: but now have I kept thy word.
Before I was afflicted I went astray: but now have I kept thy word.
Psalms 119:65 Thou hast dealt well with thy servant, O LORD, according unto thy word.
Psalms 119:66 Teach me good judgment and knowledge: for I have believed thy commandments.
Psalms 119:67 Before I was afflicted I went astray: but now have I kept thy word.
Psalms 119:68 Thou art good, and doest good; teach me thy statutes.
Psalms 119:69 The proud have forged a lie against me: but I will keep thy precepts with my whole heart.
The verse centers on "before", "afflicted", "went", "astray", "kept", and "word". It is saying that the verse draws attention to "before" and "afflicted", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 66's "Teach me good judgment and knowledge for..." into verse 68's "Thou art good and doest good teach...", so "before" and "afflicted" 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 "before" and "afflicted" with trust shaped by these words, not by a vague optimism outside the passage.