A great difficulty in reading the Old Testament is a lack of attention to the fact that it was written several thousands of years ago when, among other things, there was little reflective understanding of human psychology.
God is love and so we must reflect whether it is likely that God asked Abraham to sacrifice his son Isaac as a test. It is really much more likely that we human beings put God to the test, demanding signs and proofs, and even bargaining with God when faith and trust are what will bring us God's great graces.
Most likely, then, we should read this story from Genesis as a narrative trying, at that stage and level of human consciousness, to deal with Abraham's psychological struggle to believe when the facts seem to dictate otherwise. Abraham and his wife were old. They had one child and no hope of another. All God's promises rested on this child. But suppose something happened to this child and he died! How, then, could God fulfil all his promises? Would God not then be unfaithful to his word?
Nowadays we can discuss our propensity to bargain with God in terms of psychology and spirituality. Ancients had no such instruments and resorted to stories such as this rather brilliant and sophisticated one.
Lord, I believe: help me in my unbelief.