17 “And now, brothers, I know that you acted in ignorance, as did also your rulers.
18 But what God foretold by the mouth of all the prophets, that his Christ would suffer, he thus fulfilled.
19 Repent therefore, and turn back, that your sins may be blotted out,
20 that times of refreshing may come from the presence of the Lord, and that he may send the Christ appointed for you, Jesus,
21 whom heaven must receive until the time for restoring all the things about which God spoke by the mouth of his holy prophets long ago.
22 Moses said, ‘The Lord God will raise up for you a prophet like me from your brothers. You shall listen to him in whatever he tells you”
God keeps all of His promises and He knows the deep inner workings of Mankind to watch them all be fulfilled. It’s not that Pilate or the Pharisees, or the crowd couldn’t control themselves. God knew how the nature of people would handle the coming of the Son of God.
So just as they were free to reject and kill Jesus, they are free to repent and turn back to Him from this speech by Peter.
Peter is trying to show them that just as God was right in them killing Jesus, God is right in the blessings that come from repenting and following Jesus.
He goes all of the way back to Moses to prove his point. Moses said that another one would come like Moses. By showing that Jesus fulfills this prophecy, Peter puts Jesus into context not as a new Law giver, but as a new Way-of-Life giver. Jesus offers a new way of life that is as different from our old lives as the promised land is different from slavery in Egypt. Jesus gives us a new way to live that is as free as being in your own land, with your own people, under your own god’s rule.
There isn’t room for it here, but you can even go through the whole Exodus and Numbers account and see all of the ways that Jesus rescues, provides bread (Manna/Himself) and water (to drink/the Holy Spirit) and leads His people through the wilderness (the pillar/the Church). There is a whole lot more in those books if you look for Jesus in them.
So Peter points the people from their rebellion and their disobedience to God into the most right obedience ever. Repent, turn from whatever it is you already know is keeping you away from God, and follow Jesus. All of the blessings and curses God promised will come to all mankind, so trust Him and receive the blessings.