“You keep him in perfect peace whose mind is stayed on you, because he trusts in you.” (Isaiah 26:3 ESV)
How do I stay on the path of righteousness? First is acknowledging that it is impossible without the step by step guiding of the Holy Spirit. Second is related to the first, to keep my mind on God. To seek Him and His righteousness.
“My soul yearns for you in the night; my spirit within me earnestly seeks you.” (Isaiah 26:9a ESV)