Psalm 119:34 Give me understanding, and I shall keep Your law; indeed, I shall observe it with my whole heart.
Before each of us knew Christ we did not truly know His ways. Some, like Paul, have a vast knowledge of the law but do not really know Christ.
I talk about knowing Christ here as a heart knowledge rather than a head knowledge because without that heart knowledge we will not seek to follow Christ; instead we will continue to follow the world.
Here, David asks for that understanding that God can give him so that he can apply God’s Law successfully into his life and live for Christ rather than the world.