Whilst giving a sermon in the temple, Peter said to people:
Acts 3:17 NASB
“And now, brethren, I know that you acted in ignorance, just as your rulers did also."
Why did the Jews act in ignorance in having Jesus excecuted?
The Jews did not recognize Jesus as the Messiah / Christ sent by God out of ignorance because they were convinced (just like the disciples of Jesus at first) that the Messiah had to be a military conqueror that would suppress the Romans with military power, like a true King. The Jews did not recognize that the Messiah is not only a king and son of God in the OT, but also the suffering servant as in Isaiah 53.
( for a scholarly treated that the Messiah would die and rise again, although not evident from the OT, review the following monograph : https://www.lexhampress.com/products/6078/the-resurrected-servant-in-isaiah )
Now, look at the following additional passages that should be answering your question more directly:
27 For those who live in Jerusalem and their rulers, because they* did not recognize this one, and the voices of the prophets that are read on every Sabbath, fulfilled them* by* condemning him.* 28 And although they* found no charge worthy of death, they asked Pilate that he be executed.
⟦But Jesus said, “Father, forgive them, for they do not know what they are doing.”⟧ And they cast lots to divide his clothes.
1 Cor. 2.8:
which none of the rulers of this age knew. For if they had known it, they would not have crucified the Lord of glory.
I would have a slightly different interpretation. "Woe to him who sins, but woe to him to whom the sin comes" (Matt 18:7 and Eze ch. 18 and Eze 18:20 specifically), is how I would interpret this scripture. Basically the people were like sheep who did whatever the priests and scribes said (Luke 23:10). Pilate would have let Jesus go, because he could not see that he was inciting anyone, but the people were actually incited by the priest and scribes into a frenzy (Luke 23:4,23:20,23:22) This means that the Pharisees knew exactly what they were doing (Matt 14:12,26:47,26:59) plotting (which means premeditately deciding) how to kill Jesus. The people were just a bunch of plebs doing what they were told. Note that the mob really consists of the priests and elders in the garden but then grew as they travelled to Pilate.