To my mind this is a strange inclusion in the text. Why is chapter 23 even recorded?
Well, for one thing we need to give some thought as to why it is not there. Some commenters try to tie this chapter into Paul’s allegory of the Child of the Promise and the Child of Slavery. (I didn’t say they were good commenters.) They say that we see in the death of Sarah, the passing of Israel. You should never allegorize Scripture. Only Scripture can break that rule, and when it does, it does not give us license to expand such allegories.
Instead, we see an important reminder. The Bible is the story of God’s intervention in history to bring about the reconciliation of fallen creation. Genesis shows us the beginnings of this plan. But this is a long game God is playing. When He chooses Abraham to bless all of creation and to be the forefather of the Messiah, He is going to wrap things up in a few years. Death is still an emanant threat. It is still an ever-present enemy and reminder of our rebellion. We continue to struggle against sin and death—and lose—for millennia. Even after Christ is victorious over sin and death, God still plays out His salvation plan. People continue to live and die, but just as we saw an aspect of grace in Genesis 3, we still see creation continue, God giving more time for more people to find their way back to Him.
Also, there is something here about being a sojourner in this fallen world with God. We do not have—or need—a home here in this fallen world. We are just “passing through.” And yet we do come “to rest” in death and await God’s ultimate restoration there.