Was Jesus crucified because he said he was God?
No, Jesus never said he was God. (He was only recognized as divine and worshiped after his crucifixion.)
Was he crucified because he said he was the son of God?
No, although the religious leaders didn’t like when he referred to himself as the son of God, this was not unprecedented. David called himself a son of God (Psalm 2:7) and in Psalm 82:6 the powerful wicked are referred to as both gods and as sons of the Most High. The nation of Israel was also called Yahweh’s firstborn son (Exodus 4:22 & Jeremiah 31:9). And in Genesis, Deuteronomy, and Job there are references to “sons of God.”
Then why was Jesus crucified?
The Jewish religious authorities, probably motivated by Jesus’ continual harsh criticism of them, knew that if they turned him over to the Romans, he would likely be crucified since many Jews were calling him the long-awaited Messiah, and he talked often of “the kingdom.” The charge brought against him was that he declared himself to be King of the Jews. It was for this reason Pilate ordered his crucifixion.
What the death of Jesus accomplished is a far more difficult question to answer since it requires one to consider the various atonement theories. Maybe I’ll tackle it one day.