In Acts 2:23, Peter preaches and says to the people, “But God knew what would happen, and his prearranged plan was carried out when Jesus was betrayed. With the help of lawless Gentiles, you nailed him to a cross and killed him.” God had a prearranged plan before the world began, knowing that man would sin and would need reconciliation. So when Judas betrayed Jesus in the garden, God had already known what would happen, so it did not shake Him off of His throne or change His plan.
Peter says that with the help of lawless Gentiles, He was nailed to a cross. The hard hearts of men yelled, “Crucify Him,” and chose Him to be crucified over a criminal. The hard hearts of men tried Him in the dark of night, in secret, so that the people would not know. The hard hearts of men cast lots for His clothing while He was dying.
Hard hearts today continue to nail Him on a cross. Our sin nailed Him to the cross that day and continues to every time we choose sin over Him. There would be no need for the cross if there was no sin. So we see that His death was needed to heal the relationship between God and man. We need His salvation to live a righteous life.