The Hebrew word "yada" refers to intimate knowledge gained by personal experience, such in
Genesis 4:1, where Adam knew (yada) Eve, she conceived, and gave birth to Cain. In
Exodus 33:13, Moses wanted God to be gracious to him by teaching him His way that he might know (yada) Him and Israel too, and in
1 Kings 2:1-3, God taught how to walk in His way through His law. In
Jeremiah 9:3 and
9:6, they did not know (yada) God and refused to know him because in 9:13, they had forsaken His law, while in 9:24, those who know God know that He delights in practicing steadfast love, justice, and righteousness in all of the earth, so delighting in expressing these and other aspects of God's nature through our obedience to His instructions for how to do that found in His law is the way to know God. Furthermore, it is also the way to know Jesus, who is the exact image of God's nature (
Hebrews 1:3), which he expressed through setting a sinless example of how to walk in obedience to God's law. In
1 John 2:4, those who say that they know Jesus, but don't obey his commandments are liars, in
1 John 3:4-6, those who continue to practice sin in transgression of God's law have neither seen nor known him, and in
Matthew 7:23, Jesus said that he would tell those who are workers of lawlessness to depart from him because he never knew them.
So the goal of God's law is to teach us how to know Him and Jesus, which is eternal life (
John 17:3,
Matthew 19:17,
Luke 10:25-28,
Revelation 22:14), or in other words, to teach us how to have a personal relationship with God through expressing, experiencing, loving, believing in, and testifying about His nature. This is also why the Bible uses the same terms to describe aspects of the nature of God as it does to describe aspects of the nature of God's law, such as with it being holy, righteous, and good (
Romans 7:12), or with justice, mercy, and faithfulness being weightier matters of the law (
Matthew 23:23). For example, by doing good works, we are expressing, experiencing, loving, believing in, and testifying about God's goodness, which is why our good works bring glory to the Father (
Matthew 5:13-16), and that is the way to grow in a relationship with God.