Jesus Christ, the Son of God, who knew no sin, became sin for us. He did not do or commit anything that caused Him to become sin and curse for us. To an extent, He willingly accepted to endure this Highly unjust treatment for our sake, and therefore, He bore our sins SPIRITUALLY, through the divine exchange on the cross.
In like manner, we also did not commit or do anything that caused us to become the righteousness of God. To an extent, we also willingly accepted to be unjustly involved in Christ to bear His righteousness SPIRITUALLY, through the divine exchange on the cross. God was in Christ, reconciling the world to Himself.