The key to understanding the question is the verse: "the Sadducees, who say there is no resurrection, came to Him and asked..." (Mt 22:23) The Sadducees' question was insincere, designed to prove that the idea of an afterlife was ridiculous. Thus, when Jesus says the Pharisees did not know the scriptures, he referred to the scriptures teaching that there is an afterlife/resurrection in which the individual identity survives so definitely as to recognize one's spouse.
According to Britannica:
The Sadducees refused to go beyond the written Torah (first five books
of the Bible) and thus, unlike the Pharisees, denied the immortality
of the soul, bodily resurrection after death.
The Sadducees would have been aware of the teaching that souls reside in Sheol, because the term (sometimes translated as "the grave) is mentioned in the Torah. We don't know if the Sadducees thought the term referred to "death" or some form of afterlife. In any case, the residents of Sheol are semi-conscious beings who hardly recognize each other. The Sadducees' basic attitude was that of Ecclesiastes 3:20: "All go to one place; all are from the dust, and all turn to dust again."
Job and Daniel
We should therefore look for OT scriptures that support the idea of the survival of conscious spiritual agency after death--something more than virtual sleep-walking of Sheol. One of the first scriptures to promote this idea is Book of Job which asks: "If a man die, shall he live again?"... and answers: "after my skin is destroyed, this I know, That in my flesh I shall see God."
Jesus may also have in mind the prophecy of Daniel 12:
At that time Michael shall stand up... and your people shall be
delivered, every one who is found written in the book. And many of
those who sleep in the dust of the earth shall awake, some to
everlasting life, some to shame and everlasting contempt. Those who
are wise shall shine Like the brightness of the firmament. And those
who turn many to righteousness, like the stars forever and ever.
Apocrypha and Enoch
The OP mentions "OT Scriptures," which raised the issue of which books Jesus might have accepted as scriptural. (The OT canon was not clearly formed at the time.) He may have referred to teachings mentioned in the intertestamental literature, which were included in the Septuagint Jewish collection of scripture and later accepted by Catholics and the Orthodox as the OT Apocrypha. In these texts the afterlife and the resurrection are further developed. Afterlife and Resurrection Beliefs in the Second Temple Period explains:
The issue of the afterlife among the Jews became much more prevalent
at the close of the First Temple Period and after the return of the
Jews from Babylonian exile... By the end of this period, a belief in a
bodily resurrection had become a mainstream belief in both surviving
strands of Second Temple Judaism: Rabbinic Judaism and the early
Christian Church, and a central tenet for both communities.
One example of the concept of resurrection/afterlife in the Apocrypha is 2 Maccabees 7:14, where a young man about to be martyred tells the king:
One cannot but choose to die at the hands of mortals and to cherish
the hope God gives of being raised again by him. But for you there
will be no resurrection to life!
We should also mention the Book of Enoch, which was accepted only by the Ethiopian churches, but was influential enough to be sited in the Letter of Jude. This work deals with otherworldly life in detail and portrays Enoch as an especially active agent in the spiritual world. Since the Letter of Jude refers to prophecies from this work, it is possible that Jesus considered it to be scripture. 1 Enoch 50 states:
For in those days the Elect One shall arise, And he shall choose the
righteous and holy from among them: For the day has drawn nigh that
they should be saved... And his mouth shall pour forth all the secrets
of wisdom and counsel: For the Lord of Spirits hath given [them] to
him and hath glorified him.
Ezekiel 37's prophecy of the Valley of Dry bones may also be mentioned, although it is probable that Jesus, like other Jews, understood it as a prediction of Israel's restoration, not the resurrection.
Conclusion: The prophecy of Daniel 12 is the most likely scripture that Jesus had in mind. However he may have been thinking of others, including Job, the OT Apocrypha and Enoch.