Some people believe that the Matt 27:51-53 resurrection was a resurrection of old testament saints who were then raptured when Jesus ascended, but there are other scriptures that contradict that and I think it points to something else happening.
Matthew 27:51 says “At that moment the curtain in the sanctuary of the Temple was torn in two, from top to bottom. The earth shook, rocks split apart, 52 and tombs opened. The bodies of many godly men and women who had died were raised from the dead. 53 They left the cemetery after Jesus’ resurrection, went into the holy city of Jerusalem, and appeared to many people.”
I believe the Matt 27:51-53 resurrection is a temporal resurrection. Just like Lazurus (John 11), Jairus’ 12-year-old daughter (Mark 5:21-43), the widow’s son (Luke 7:11-17), as well as the other people resurrected by prophets in the Old Testament (1 Kings 17:17-24, 2 Kings 4:18-37, 2 Kings 13:20-21). Those people were resurrected, but eventually, they died again when they got older, so it was a temporal resurrection, just a second chance at life.
The people in Matt 27 appear to be residents of Jerusalem and the surrounding area, from around the time of the 1st Century or maybe some years before rather than Old Testament Saints like Abraham and David. It says they went into the city of Jerusalem and appeared to many people. However, nobody from that era would have recognized Abraham and David since they are from thousands of years before and the 1st-century people didn’t have an image of them to compare. Also, Abraham and his immediate family are all buried in Hebron which is around 40.4 km (25 miles) away, and these verses seem to indicate a more localized event in Jerusalem. In addition, it just says they went into Jerusalem where does it say they were raptured when Christ ascended? Also, Peter makes it clear that David is still dead after the resurrection of Jesus in Acts 2:29. He quoted Ps16:8-11 and pointed out that it is a messianic prophecy about the resurrection of Jesus and David (the author) couldn’t have been talking about himself since he is still dead.
Furthermore, what is the significance of Old Testament believers being resurrected if no one would recognize them? It makes more sense that these were recognizable people from that era and location. New bodies and ascension would likely have been mentioned in Matthew 27, but also in the other gospel accounts since that would be a major event with major theological implications. If it can’t be shown that these things occurred in Matt 27, then the OT saints will likely get resurrected with every other believer in the 1st resurrection (Revelation 20:4-6) to eternal life, which hasn’t happened yet. This is the resurrection that the old testament patriarchs would have been looking forward to.
We must ask the question of why and how this event happened, and why is it in only one gospel account? I don’t know why this is only in Matthew’s account. As for the why and how, my best understating of the why is that they were resurrected so that people can testify they witnessed a great resurrection, making it easier for them to believe that Jesus could also be raised from the dead. I have an idea on the how as well. It could have been like in 2 Kings 13: 20-21 when some men Jewish men were going to bury a dead man and saw some Moabite raiders coming. So in a panic, they threw the corpse into a tomb and hid. The tomb they threw the corpse into was Elisha’s and the body of the dead man came to life again when he touched the bones of Elisha. This was because of the anointing on his bones. When Christ died, there was a physical city-wide earthquake, which tore the veil and broke physical tombs, and when he rose maybe his anointing sent out a spiritual shockwave throughout the area, awakening all the recently deceased people from the city of Jerusalem, who then went back to visit their relatives in the city. He is the Christ/Messiah (anointed one) after all so his anointing is greater than all of the prophets.
A final resurrection, in contrast, would be one of the 2 resurrections described in the New Testament. The resurrection of the righteous (1st resurrection) is when people get new bodies and lived forever (1 Cor 15:12-58, Heb 11:35, Rev 20:4-6). Then the 2nd Resurrection of the wicked, who are cast into the Lake of Fire forever on Judgment Day which happens after the millennial reign of Christ, is described in Rev 20:4-6 & Rev 20:11-15. There can only be one 1st resurrection so if the future resurrection of the saints described by Paul after Jesus rose still has yet to happen, then the Matt 27 resurrection could not be it. These final resurrections are permanent and succeeded by our final eternal destinations.
This article on the subject talks about a bunch of other possibilities and interpretations as well. Like the idea that the saint’s tombs were open when Jesus died, but they didn’t get up and go to the city immediately but rather weren’t raised until Jesus rose. The explanation is that Matthew simply narrated their resurrection first so that he could focus on Jesus later. “This preserves Jesus’s place as the true ‘first fruits’ of resurrection (1 Cor. 15:23), rather than certain other saints preceding him.” They also debunk the idea that this event was an exaggeration or allegory or some that Matthew himself created for his telling of the story.