God illustrated to Abraham what was required for all mankind to be saved - the sacrifice of his own son, who submitted to God's will.
That's a popular misconception in Christianity.
There's context for the near-sacrifice of Isaac in the book of Jasher.
And when Isaac was thirty-seven years old, Ishmael his brother was going about with him in the tent.
And Ishmael boasted of himself to Isaac, saying, I was thirteen years old when the Lord spoke to my father to circumcise us, and I did according to the word of the Lord which he spoke to my father, and I gave my soul unto the Lord, and I did not transgress his word which he commanded my father.
And Isaac answered Ishmael, saying, Why dost thou boast to me about this, about a little bit of thy flesh which thou didst take from thy body, concerning which the Lord commanded thee?
As the Lord liveth, the God of my father Abraham, if the Lord should say unto my father, Take now thy son Isaac and bring him up an offering before me, I would not refrain but I would joyfully accede to it.
And the Lord heard the word that Isaac spoke to Ishmael, and it seemed good in the sight of the Lord, and he thought to try Abraham in this matter.
And the day arrived when the sons of God came and placed themselves before the Lord, and Satan also came with the sons of God before the Lord.
And the Lord said unto Satan, Whence comest thou? and Satan answered the Lord and said, From going to and fro in the earth, and from walking up and down in it.
And the Lord said to Satan, What is thy word to me concerning all the children of the earth? and Satan answered the Lord and said, I have seen all the children of the earth who serve thee and remember thee when they require anything from thee.
And when thou givest them the thing which they require from thee, they sit at their ease, and forsake thee and they remember thee no more.
Hast thou seen Abraham the son of Terah, who at first had no children, and he served thee and erected altars to thee wherever he came, and he brought up offerings upon them, and he proclaimed thy name continually to all the children of the earth.
And now that his son Isaac is born to him, he has forsaken thee, he has made a great feast for all the inhabitants of the land, and the Lord he has forgotten.
For amidst all that he has done he brought thee no offering; neither burnt offering nor peace offering, neither ox, lamb nor goat of all that he killed on the day that his son was weaned.
Even from the time of his son's birth till now, being thirty-seven years, he built no altar before thee, nor brought any offering to thee, for he saw that thou didst give what he requested before thee, and he therefore forsook thee.
And the Lord said to Satan, Hast thou thus considered my servant Abraham? for there is none like him upon earth, a perfect and an upright man before me, one that feareth God and avoideth evil; as I live, were I to say unto him, Bring up Isaac thy son before me, he would not withhold him from me, much more if I told him to bring up a burnt offering before me from his flock or herds.
And Satan answered the Lord and said, Speak then now unto Abraham as thou hast said, and thou wilt see whether he will not this day transgress and cast aside thy words.
Jasher 22:41-55
This relates to the story of Job:
Now there was a day when the sons of the Elohim came to present themselves before YHWH, and Satan came also among them.
And YHWH said unto Satan, Whence comest thou? Then Satan answered YHWH, and said, From going to and fro in the earth, and from walking up and down in it.
And YHWH said unto Satan, Hast thou considered my servant Job, that [there is] none like him in the earth, a perfect and an upright man, one that feareth Elohim, and escheweth evil?
Then Satan answered YHWH, and said, Doth Job fear Elohim for nought?
Hast not thou made an hedge about him, and about his house, and about all that he hath on every side? thou hast blessed the work of his hands, and his substance is increased in the land.
But put forth thine hand now, and touch all that he hath, and he will curse thee to thy face.
Job 1:6-11