Yes! Because the wages of sin is death (Rom. 6:23).
Though Jesus never sinned (1 Peter. 2:22), He bore our sins in His body on the cross (1 Peter. 2:24), and died in our place. Instead of God making us pay for our sins, He did it Himself by becoming one of us.
Two things happen when we sin: one to God and one to ourselves.
When we sin, God is offended because it is His Law that we are breaking.
Also, when we sin, we also die. We don’t die right there on the spot, but we do make it a certainty that we will face a death that is far more severe.
Sin, even the slightest, kills us (Rom. 6:23) by forcing God to ensure we will be eternally separated from Him. (Isaiah 59:2).
God hates sin (Hab. 1:13), and sin must be punished or there is no justice.
Since none of us are able to please God on our own, He made an offering that is pleasing to Himself.
That offering was the sacrifice of Jesus on the cross.
There was no other way. If there were, God would have done it.