Where do I start,
Abraham did not actually kill Isaac, God was just testing Abraham to see if he would actually do anything he told him to do, and in the moment Abraham was about to sacrifice Isaac God stopped him. Abraham would never have done that had God not commanded it as a test of his loyalty.
I hope this has cleared up any misunderstandings.