The reason for Paul’s instructions in 1 Corinthians 7:18 is that neither circumcision nor uncircumcision is of any relevance for keeping the commandments of God.
This distinction between God’s ceremonial law and his abiding moral commandments is already present in the Old Testament (see, e.g., Deuteronomy 10:16; Psalm 40:6–8; Psalm 50:7–15; Psalm 51:15–17; Jeremiah 7:21–23; Hosea 6:6; Micah 6:6–8).
19 For neither circumcision counts for anything nor uncircumcision, but keeping the commandments of God.