Peter (recorded by Luke) applies a text about YHWH from the OT in reference to Jesus.
Jesus and the Angel of YHWH
The New Testament identifies Jesus as the Angel. Remember, an angel is one who is sent without reference to the nature of the one sent.
When 1 Corinthians 10:1 is compared with Exodus 13:21, and Exodus 14:19, 24 the Angel of God, who had been going before the camp of Israel, moved and went behind them; and the pillar of cloud moved from before them and stood behind them. It goes on to say that '...at the morning watch, YHWH looked down on the army of the Egyptians through the pillar of fire and cloud...'
Numbers 14:14 says that it was YHWH who was among the people. And Psalm 78:14 says that '...he led them with the cloud by day and all the night with a light of fire.'
It was the Angel who accompanied the nation
and the New Testament says that it was the Messiah who accompanied them. He was their spiritual rock. (1 Corinthians 10:4) The association seems clear:
Deuteronomy 32:3-4 and Deuteronomy 32:15, 18
Jude 5 Now I want to remind you, although you once fully knew it, that Jesus*, who saved a people out of the land of Egypt, afterward destroyed those who did not believe.
* The reading Ἰησοῦς/Jesus [enjoys] ...the strongest support from a variety of early witnesses (e.g., A B 33 81 1241 1739 1881 2344 pc vg co Or1739mg)... The NET Bible (Biblical Studies Press, 2005).)
Exodus 12:51 says that YHWH brought the people out of Egypt and yet...
Judges 2:1 says that the Angel of YHWH brought Israel out of Egypt
And 1 Corinthians 10:4-5, 9 says 'all drank the same spiritual drink. For they drank from the spiritual Rock that followed them, and the Rock was Messiah. Nevertheless, with most of them God was not pleased, for they were overthrown in the wilderness.... We must not put *Messiah/Christ to the test, as some of them did and were destroyed by serpents.'
* Χριστόν (Christon, “Christ”) is attested in the majority of MSS, including many important witnesses of the Alexandrian (𝔓46 1739 1881) and Western (D F G) textvtypes, and other MSS and versions (Ψ latt sy co). The NET Bible (Biblical Studies Press, 2005).
Numbers 26:65 For YHWH had said of them, “They shall die in the wilderness.” Not one of them was left, except Caleb the son of Jephunneh and Joshua the son of Nun.
John 8:58
“εἶπεν αὐτοῖς Ἰησοῦς· Ἀμὴν ἀμὴν λέγω ὑμῖν, πρὶν Ἀβραὰμ γενέσθαι ἐγὼ εἰμί.” (John 8:58)
הֵשִׁיב לָהֶם יֵשׁוּעַ׃ ״אָמֵן אָמֵן אֲנִי אוֹמֵר לָכֶם, בְּטֶרֶם הֱיוֹת אַבְרָהָם, אֲנִי הוּא.<\p>
"So the Judeans said to Him, “You are not yet fifty years old, and have You seen Abraham?” Jesus said to them, “Truly, truly, I say to you, before Abraham was born, I am.” Therefore they picked up stones to throw at Him, but Jesus hid Himself and went out of the temple." The lead up to his statement is this:
“So they were saying to Him, “Where is Your Father?” Jesus answered, “You know neither Me nor My Father; if you knew Me, you would know My Father also.”” (John 8:19) “And He was saying to them, “You are from below, I am from above; you are of this world, I am not of this world.” (John 8:23) ““I speak the things which I have seen with My Father; therefore you also do the things which you heard from your father.”” (John 8:38)
Jesus took their statement to another level. Not only had he seen Abraham but he was in existence not just before Abraham (which would read ἤμην - ‘I was’) but eternally ‘ἐγὼ εἰμί’. Notice that their response was to pick up stones to throw at him just as in John 10:31 where we are explicitly told their response was to his perceived blasphemy “For a good work we do not stone you, but for blasphemy; and because You, being a man, make yourself out to be God.”
What does Torah say about blasphemy? “‘Moreover, the one who blasphemes the name of the Lord shall surely be put to death; all the congregation shall certainly stone him...” (Leviticus 24:16).
So in John 8:59 their response to his claim was to try and stone him.
John 8:58 reads '...πρὶν (before) Ἀβραὰμ γενέσθαι (was/existed) ἐγὼ εἰμί (I myself am/exist).'
The Greek version (LXX) of the Torah (circa 250 BC) translates "אני הוא" in Deuteronomy 32:39 as "‘See now that I am (ἐγώ εἰμι), And there is no god besides Me..." Isaiah 41:4 "‘I, יהוה , am the first, and with the last. I am he (ἐγώ εἰμι)’ "
And Isaiah 43:10 reads
““You are My witnesses,” declares יהוה, “And My servant whom I have chosen, So that you may know and believe Me And understand that I am He (ἐγώ εἰμι)...”
Compare this with the words of Jesus to John in Revelation 1:7:
"When I saw Him, I fell at His feet like a dead man. And He placed His right hand on me, saying, “Do not be afraid; I am (ἐγώ εἰμι) the first and the last..."
Revelation 22:13, 16
"I am the Alpha and the Omega, the first and the last, the beginning and the end... I, Jesus, have sent My angel to testify to you these things for the churches. I am the root and the descendant of David, the bright morning star."
Also Isaiah 43:13, 46:4, 48:12. Isaiah 52:6 is interesting because there יהוה says:
"Therefore my people will know my name in that day. For I am (ἐγώ εἰμι/אני הוא), behold I, the one speaking."