Obviously, God didn’t start out with “Yo, Abram! You don’t know me, but I know you! Kill your kid for me, will ya?”
By the time we get to the Isaac story, Abraham had been talking to God off and on for at least thirty years, with miracles galore. Isaac was only born by a miracle, and was explicitly part of God’s promise that Abraham would have descendants as numerous as the stars. So it was logical for Abraham to assume that, if he did what God wanted, Isaac would be brought back from the dead with no harm done (which is what Paul says about it, and he’s writing inspired Scripture so it’s a darned good source).
(Now Abraham came from Ur of the Chaldeans, where the pagan belief was that Ishtar had gone down to the lands of the dead and come out again. The interesting bit is that people used to think that she went down to save Tammuz, but apparently she just went down and then had to find somebody to take her place, in order to get out. She picked Tammuz, because he wasn’t mourning her, and then Tammuz’ sister offered to go to the underworld for half the year. So that’s the kind of story that was out there, and thus Abraham may have been expecting for Isaac to be brought back from the dead and himself to have to take Isaac’s place in Sheol. But that’s all my speculation and not Paul.)
Anyway, Abraham wasn’t just listening to J. Random Voice. It was a matter of having had a long enough relationship with God to have trust, obedience, and a shrewd idea as to what God was up to. Not the correct idea, as it happened, but in the correct plan-of-salvation ballpark.