God is trustworthy, therefore what He has instructed is also trustworthy (Psalms 19:7), so the way to depend on God is by depending on what He has instructed while it is contradictory to think that we should depend on God, but should not depend on what He has instructed.
In Matthew 4:15-23, Christ began his ministry with the Gospel message to repent for the Kingdom of God is at had, which was a light to the Gentiles, and the Mosaic Law was how his audience knew what sin is (Romans 3:20), so repenting from our disobedience to it is a central part of the Gospel message. Furthermore, Christ set a sinless example of how to walk in obedience to the Mosaic Law, and we are told to follow his example (1 Peter 2:21-22) and that those who are in Christ are obligated to walk in the same way he walked (1 John 2:6). So Christ spent his ministry teaching his followers to obey the Mosaic Law by word and by example, and the way to depend in him is by depending on what he taught. As such, Galatians should not be interpreted as speaking against depending on Christ.
All throughout the Bible, God wanted His people to repent and to return to obedience to the Mosaic Law, so it would be absurd to interpret Paul as warning us against doing that and saying that we will be severed from Christ is we depend on what he taught. Paul's problem in Galatians was not with those who were teaching Gentiles how to depend on what Christ taught, but with those who were wanting to require Gentiles to obey their works of the law in order to become justified.
Moreover, 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 the Mosaic Law, and he chose the way of faithfulness by putting the Mosaic Law on his heart, so this has always been the one and only way of becoming justified by grace through faith, and it is what it means to be under grace, not the way to fall from it. It would be absurd to interpret these verses as him wanting God to be gracious to him by teaching him how to fall from grace. In Exodus 33:13, Moses wanted God to be gracious to him by teaching him to walk in His way that he might know Him and Israel too, knowing God is eternal life (John 17:3), and it would again be absurd to think that he wanted God to be gracious to them by teaching them how to fall from grace. In Genesis 6:8-9, Noah found grace in the eyes of God, he was a righteous man, and he walked with God, so God was gracious to him by teaching him to walk in His way in obedience to His law and he was righteous because he obeyed through faith, so again this is the only way to become justified, and it would be absurd to think that Noah found grace in the eyes of God through being taught to fall from grace. In Romana 1:5, we have received grace in order to bring about the obedience of faith, not in order to bring about our fall from grace. In Titus 2:11-14, our salvation is described as being trained by grace to do what is godly, righteous, and good, and to renounce doing what is ungodly, not described as being trained by grace to fall from grace.