Please be more specific about what you are wanting me to explain about Titus 2:11-13 or Matthew 5:7.
In regard to Matthew 7:23, Hebrews word "yada" refers to intimate relational knowledge gained by experience, such as in Genesis 4:1, Adam knew (yada) Eve, she conceived, and gave brith to Cain. In Exodus 31:33, Moses wanted God to be gracious to him by teaching him to walk in His way that He and Israel might know (yada) Him, 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 God's 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 practicing those and other aspects of God's character in obedience to His law is the way to know Him, which is also the way to know the Son who is the exact image of His character (Hebrews 1:3). In 1 John 2:4, those who say that they know Jesus, but don't obey his commands are liars, in 1 John 3:4-6, those who continued 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 the law is to know God and Jesus through experiencing God's character traits, which is eternal life (John 17:3), which is also why Jesus said that the way to inherit eternal life is by obeying God's law (Luke 10:25-28, Matthew 19:17).
However, people can go through the motions of obeying God's law while neglecting to experience aspects of God's character that it was given as a gift to teach us how to experience, such as in Matthew 23:23, Jesus said that tithing was something that they ought to be doing while not neglecting weightier matters of the law of justice, mercy, and faith. In John 5:39-40, Jesus said that they searched the Scriptures because they thought that in them they would find eternal life, and they testify about him, yet the do not come to him that they might have life. So eternal life can be found in Scriptures and they were correct to search for it there, but they needed to recognize that the goal of everything in Scripture is to testify about how to know Jesus and to come into relationship with him for eternal life. In Romans 9:30-10:4, they had a zeal for God, but it was not based on knowing Him, so they failed to attain righteousness because they misunderstood the goal of the law by pursuing it as through righteousness were earned as the result of their works in order to establish their own instead of pursing the law as through righteousness were by faith in Christ, for knowing Christ is the goal of the law for righteousness for everyone who has faith. In Philippians 3:8, Paul was in the same situation as these verses and those spoken against in Matthew 7:23 where he had been going through the motions of obeying God's law, but without being focused on knowing Christ, so he had been missing the whole goal of the law, and that is what he counted as rubbish.
In Psalms 119:29-30, he wanted to put false ways far from him, for God to be gracious to him by teaching him to obey His law, and he chose the way of faith by setting it before him, so this has always been the one and only way of salvation by grace through faith.