Obeying the letter of the Law is about outwardly obeying it exactly how it is written while not paying attention to the intent of the Law of showing our love for God and growing in a relationship with Him. Obeying the Spirit of the Law is inwardly obeying it in a way that shows our love for God and builds our relationship with Him. The letter kills because it is missing the whole point of the Law. In Matthew 7:21-23, the Pharisees were doing good things in accordance with what the Law instructs, but they were nevertheless regarded as Lawless because they didn't have a relationship with Jesus because he said he didn't know them.
Romans 10:4 Christ is the goal of the Law, which leads to righteousness for all who have faith in God.
In Romans 9:30 - Romans 10:4, Israel did not fail to obtain righteousness because they did what God commanded them and God gave them faulty commands, but rather they failed to obtain righteousness because they misunderstood that the purpose of obeying the Law was a relationship with Christ for everyone who has faith, and instead sought to establish their own righteousness.
It makes no sense to say that we need to die to God's instructions for how to live for Him in order to life for Him. Rather, Romans 7:4 is referring to what was being talked about in the previous verses. We died to the law of our husband through the death of Christ so that me might be free to belong to another, to him whom God raised from the dead.
The Law was given to reveal what sin is and there are far more things that are sins than are listed in the TC, so there are no grounds whatsoever to refer to just the TC as moral laws and say that it would be moral to disobey all of God's other commands. The Mosaic Law did not command the Pharisees to clean cups, but rather that was a man-made tradition. In Mark 7:6-9, Jesus criticized the Pharisees for being hypocrites for setting aside the commands of God in order to establish their own traditions, so his issue with them was that they were not obeying the Mosaic Law. So he was not making a distinction between God's moral and non-moral laws, but between God's Law and man's law.