Psalm 119:34—“Give me understanding, and I shall keep Your law; Indeed, I shall observe it with my whole heart.”
David here is asking for a proper understanding of God’s law, its purpose, benefits, and lovingkindnesses. Anyone who truly understands God’s law should want to obey it. Sin has dire, negative consequences, as we learn all throughout the Bible and can see in our own times. One modern example: the sin of transgenderism—and it a sin to reject God’s will for us—has led to countless struggles and even deaths among those who follow that sad, rebellious path. America’s streets, and yea, even the halls of Congress are filled with people who have no understanding of God’s law. The results are manifest to anyone with eyes to see.
God will not miraculously give us understanding. We have to study with a pure heart and a good conscience. God has so created a us that, if we have such a heart and mind, we will understand His law. He doesn’t miraculously give some people “understanding” and withhold it from others. That would make Him a respecter of person, something the Bible repeatedly tells us He is not.
Once we truly comprehend the nature, purposes, and advantages of obeying God’s will, we should be better motivated to “observe it” with our “whole heart.” We will find God when we seek Him with all our heart, and not before (Jeremiah 29:13).