There are at least two, possibly three answers to this, none fully satisfactory.
Answer #1
The first answer is provided, in part, by Heb 11:17-19 -
By faith Abraham, when he was tested, offered up Isaac on the altar.
He who had received the promises was ready to offer his one and only
son, even though God had said to him, “Through Isaac your offspring
will be reckoned.” Abraham reasoned that God could raise the dead, and
in a sense, he did receive Isaac back from death.
In this case, Abraham's reply to Isaac in Gen 22:8 could be as a prophecy of Messiah. In support of this answer, note Abraham's other prophecy in Gen 22:5 -
“Stay here with the donkey,” Abraham told his servants. “The boy and I
will go over there to worship, and then we will return to you.”
Answer #2
Note the final point of the story as recorded in gen 22:12-14 -
“Do not lay a hand on the boy or do anything to him,” said the angel,
“for now I know that you fear God, since you have not withheld your
only son from Me.”
Then Abraham looked up and saw behind him a ram in a thicket, caught
by its horns. So he went and took the ram and offered it as a burnt
offering in place of his son. And Abraham called that place The LORD
Will Provide.
Note that we have the same phrase that encloses the story:
- in V8 Abraham says to Isaac, "the LORD will provide"
- in V14 we have the same idea of the substitute ram, "the LORD will provide"
In this answer, Abraham's answer to Isaac can be seen as prophetic, even though neither Abraham nor Isaac fully understood the import of what Abraham unwittingly prophesied.
Benson offers a third answer without excluding the other two:
Genesis 22:8. My son, God will provide himself a lamb — This was the language either, 1st, Of his obedience; we must offer the lamb
which God has appointed now to be offered; thus giving Isaac this
general rule of submission to the divine will, to prepare him for the
application of it to himself: or, 2d, Of his faith; whether he
intended them so or not, the meaning of his words proved to be that a
sacrifice was provided instead of Isaac. Thus, 1st, Christ, the great
sacrifice of atonement, was of God’s providing: when none in heaven or
earth could have found a lamb for that burnt-offering, God himself
found the ransom. 2d, All our “sacrifices of acknowledgment” are of
God’s providing too; it is he that “prepares the heart.” The broken
and contrite spirit is a sacrifice of God, of his providing.
The Cambridge commentary offers a similar view:
8. provide himself Heb. see for himself, cf. Genesis 41:33. Abraham’s words express his self-control and his faith, and have a
reference to Genesis 22:14. The provision by God of a lamb for a
burnt-offering lies at the root of the interpretation of the present
passage in its typical application to the Sacrifice of Christ. Cf. the
mention of the Lamb in John 1:29; John 1:36; 1 Peter 1:19; Revelation
5:12.