That's an excellent question.
You need to go back to the original question of what is sin.
Sin is violating the very nature of God.
For instance, since God is Truth, then when you tell a lie, you violate the nature of God.
Ultimately, all sin is rebellion against God's authority, high treason, which is punishable by death in ANY country.
God doesn't want ANY body to perish in hell, so He voluntarily came to earth as a human, totally human.
He never broke any of God's Laws, and always did what the Father instructed.
When Jesus died on the cross, it was the payment for OUR crimes (ie sins) against God. Justice is justified, so God was released to show mercy and grant us a pardon.
Jesus put it like this, "For God so loved the world, that He gave His only begotten son, that whoever believes in (trusts in, clings to, and relies on) him (ie Jesus), would not perish (in hell), but have everlasting life (in heaven). When God sent His Son into the world, it wasn't to condemn the world, but to save it. Whoever puts their trust in the Son of God will not be condemned, but whoever does NOT put their trust in the Son of God is condemned already." Why? Because "All have sinned and fall short of the glory of God", but "The wages of sin is death", whereas "The free gift of God is eternal life."
He saved us insofar as He paid the penalty.
When He rose again, it demonstrated that He truly IS the Son of God, showing that He IS able to save us.
The Bible says "If we DO sin, we have an advocate with the Father, Jesus Christ."
The Bible also says, "He who knew no sin actually became sin, so we could become righteous."
So, not only did He die FOR us, He died AS us.
I hope this helps.