God established circumcision in the flesh of the foreskin as a sign of the Abrahamic covenant.
Every male, purchased or born who is at least 8 days old must be circumcised. Any uncircumcised male who is not circumcised in the flesh of his foreskin shall be cut off from his people; he has broken my covenant.
God's command
God told Abraham, “As for you, you shall keep my covenant, you and your offspring after you throughout their generations. This is my covenant, which you shall keep, between me and you and your offspring after you: Every male among you shall be circumcised. You shall be circumcised in the flesh of your foreskins, and it shall be a sign of the covenant between me and you. He who is eight days old among you shall be circumcised. Every male throughout your generations, whether born in your house or bought with your money from any foreigner who is not of your offspring, both he who is born in your house and he who is bought with your money, shall surely be circumcised. So shall my covenant be in your flesh an everlasting covenant. Any uncircumcised male who is not circumcised in the flesh of his foreskin shall be cut off from his people; he has broken my covenant.”
Abraham is circumcised
God went up from Abraham, and Abraham circumcised every male in his household. Abraham was 99 when he was circumcised, and Ishmael was 13. (Genesis 17)
Isaac is circumcised
And Abraham circumcised his son Isaac when he was eight days old, as God had commanded him. Abraham was a hundred years old when his son Isaac was born to him. (Genesis 21)