In Genesis 22 Abraham is instructed to offer his son Isaac as a sacrifice to God. This is a hard story for us to understand. Later the law would make child-sacrifice illegal. Abraham did not have the law, but had an unshakable confidence in God’s command. The surrounding cultures did have child-sacrifice; so, it was like God was saying to him, do you love me as much as your neighbors love their gods? This test was to take the gift-child Isaac and give him back to God as a sacrifice. In the end, the child is spared, and this was God saying “NO” to this and all child-sacrifice by offering a substitute ram caught in a thicket. But Abraham passed both the test of faith and works (James 2:21). On another hill, another son would not be spared. “He who did not spare his own Son but gave him up for us all, how will he not also with him graciously give us all things? (Romans 8:32 ESV).
“By faith Abraham, when he was tested, offered up Isaac, and he who had received the promises was in the act of offering up his only son, of whom it was said, “Through Isaac shall your offspring be named.” He considered that God was able even to raise him from the dead, from which, figuratively speaking, he did receive him back.” Hebrews 11:17–19 (ESV)