Deuteronomy 10:12-16 “And now, Israel, what does the Lord your God require of you, but to fear the Lord your God, to walk in all his ways, to love him, to serve the Lord your God with all your heart and with all your soul, 13 and to keep the commandments and statutes of the Lord, which I am commanding you today for your good? 14 Behold, to the Lord your God belong heaven and the heaven of heavens, the earth with all that is in it. 15 Yet the Lord set his heart in love on your fathers and chose their offspring after them, you above all peoples, as you are this day. 16 Circumcise therefore the foreskin of your heart, and be no longer stubborn.
The heart was considered to be the center if our intellect, emotions, and will, and we need to go through the transformation of circumcising it in order to overcome our stubbornness and become become fully obedient to the Mosaic Law. In Deuteronomy 30:1-8, Moses prophesied that the Israelites would be exiled from the Promised Land because of their disobedience, that while they were in the midst of the nations that they would return to the Lord, obey His commands, that the Lord would restore their fortunes, have mercy on them, gather them from where they had been scattered, that He would circumcise their hearts and the heart of their offspring so that they will love the Lord their God with all their heart and with all of their soul, that they may live, and that they would again obey the voice of the Lord and keep all of His commandments.
Jeremiah prophesied during the time of Israel's exile that God would gather them, restore their fortunes, rebuild their cities, make a New Covenant with them where he would put His law in their minds and write it on their hearts, and forgive their iniquity and remember their sin no more (Jeremiah 31), so he echoed the prophecy of Moses and made a similar statement about God writing His law on our hearts. Ezekiel also prophesied that Jerusalem would be rebuilt, the people to dwell in peace and safety, that God would take away their hearts of stone, given them new hearts of flesh, and send His Spirit to lead them in obedience to His law (Ezekiel 36:26-28), so having a circumcised heart is also connected to the Holy Spirit (Acts 15:8-9).
In Colossians 2:11-13, Paul believed that these prophesies were being fulfilled in part through the death and resurrection of Jesus in that in him we also were circumcised with a circumcision made without hands, by putting off the body of the flesh, by the circumcision of Christ, having been buried with him in baptism, in which we were also raised with him through faith in the powerful working of God, who raised him from the dead. And we, who were dead in our trespasses and the uncircumcision of our flesh, God made alive together with him, having forgiven us our trespasses. Disobedience to the Mosaic Law is also associated with having an uncircumcised heart in Jeremiah 9:25-26 and Acts 7:51-53.
In Romans 2:13-15, it is the doers of the law who will be justified, so Gentiles show that they have faith and that God's law is written on their hearts when they obey it by nature, which is a circumcised heart that is the goal of the New Covenant in accordance with the prophesies of Moses, Jeremiah, and Ezekiel. In 1 Corinthians 7:19, Paul said that circumcision has no value and that what matters is obeying the commands of God, in Romans 3:1-2, he said that circumcision's has much value in every way, and in Romans 2:25, he said that circumcision conditionally has value if we obey the Mosaic Law, so it is not so much that circumcision has no value or great value, but that its value is entirely derived from whether we obey it. In Romans 2:26-29, the way to recognize that a Gentile has a circumcised heart is again by observing their obedience to the Mosaic Law, which is the same way to tell for Jews. Furthermore, he said that circumcision is a matter of the heart by the Spirit in accordance with Ezekiel 36:26-28.
So circumcision has always been about the heart and not just the flesh and Moses did not think that circumcision of the heart was an alternative to circumcision of the flesh, but rather circumcision of the heart has always referred to a heart that is obedience through faith. The Spirit gives us the desire to follow the Mosaic Law, which includes circumcision of the flesh, but circumcision of the flesh has no value without the inward transformation accomplished by the Spirit. It's all connected back to Moses and to Christ, who lived in sinless obedience to the Law of Moses, so at no point does having a circumcised heart involve obedience to anything other than the Law of Moses.