In Romans 10:5-8, Paul referred to Deuteronomy 30 as being the word of faith that we proclaim in regard to the righteousness that is by faith proclaiming that the Law of Moses is not too difficult for us to obey and that obedience to it brings life and a blessing while disobedience brings death and a curse, so choose life! So it as presented as a possibility and as a choice, not as the need for perfect obedience. It also does not say anything about the spirit or the letter of the law in either passage.
In Deuteronomy 32:46-47, the Law of Moses is our very life. In Proverbs 3:18, the Law of Moses is a tree of life for all who take hold it. In Revelation 22:14, those who obeyed God's commandments are given the right to the Tree of Life. In Proverbs 6:23, for the commandment is a lamp and the teaching a light, and the reproofs of discipline are the way of life. In Luke 10:25-28, Jesus affirmed that the way to inherit eternal life is by obeying the greatest two commandments. In Matthew 19:17, Jesus said that the way to have eternal life is by obeying God's commandments. In Hebrews 5:9, Jesus has become a source of eternal salvation for those who obey him. In Romans 2:6-7, those who persist in doing good will be given eternal life. In Romans 6:19-23, we are no longer to present ourselves as slaves to impurity, lawlessness, and sin but are now to present ourselves as slaves to God and to righteousness leading to sanctification, and the goal of sanctification is eternal life in Christ, so being a doer of the Law of Moses is God's gift of eternal life.
So what Paul said about the letter leading to death needs to be understood in light of the Bible repeatedly saying that the way to have life is by obeying the Law of Moses rather than a way that overturns the rest of the Bible. If following the letter referred to correctly following God's instructions and that leads to death, then that would mean that God would be misleading us and should not be trusted, so there must be something deficient about following the letter that is not correctly obeying what God has instructed that causes it to lead to death rather than life. For example, 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.