Act 2:22 Ye men of Israel, hear these words; Jesus of Nazareth, a man approved of God among you by miracles and wonders and signs, which God did by him in the midst of you, as ye yourselves also know:
Literal sense of the Greek words of
Act 2:23
Him (τοῦτον), in/at the determinate counsel (τῇ ὡρισμένῃ βουλῇ) and foreknowledge (καὶ προγνώσει) of God (τοῦ θεοῦ) given out/away/over (ἔκδοτον) - after receiving H
im (λαβόντες, aorist participle) by means of/through wicked hands (διὰ χειρῶν ἀνόμων) after crucifying
him (προσπήξαντες) you slew
Him (ἀνείλετε, aorist active indicative).
English paraphrase of the sense of the Greek -
In the determinate counsel and foreknowledge of God [Jesus of Nazareth] was given over to you. After receiving Him by the wicked hands [of Judas] [and] after nailing Him to a cross, you killed Him.
God is supremely powerful and supremely wise. He is able to determine things and bring them to pass by various means: by simply allowing people to follow their own wills where that does not interfere with His plans; or by reasoning with people and persuading them that cooperating with His plan is to their advantage; or by threatening them with dire consequences if they do not cooperate with His plan; or by cutting off all other possible routes so that they can only advance by fulfilling details of His plan.
God had intended and prophesied that He would hand over Messiah to the evil powers to do their will against Him. Many times the Jews had plotted to kill Jesus, and several times they had tried to kill him by throwing Him off a cliff, or by stoning him, but because the determinate counsel and foreknowledge of God was that Jesus die in a specific manner, Jesus' invisible angelic bodyguard prevented the Jews from killing Him in other ways, and Jesus simply walked through the midst of His would be murderers. But the one way they could carry out their plan to murder Jesus that God left open to them was by crucifixion at the hands of the Gentiles. THis being the only avenue God left open for them, this was the path they took by their own free will.
This is how I understand that it was both. It was according to God's determinate counsel and foreknowledge as revealed in prophecy. AND it was by the willing choices and actions of men. God did not predetermine the specific choices and actions of specific men at the time He prophesied the Messiah. He determined some of the choices and actions that would lead to Messiah's death, and in real time He selected people who were already committed to those specific choices and actions, and reduced their evil options doen to the ones that he had prophesied would attend the death of Messiah.