Put on the Breastplate of Righteousness by doing what is right. Doing what God tells you to do is like wearing body armor in the spiritual battle that we’re all in. Your righteousness cannot save you from the eternal consequences of your sin (only Jesus can do that for you) but it CAN help protect you from the earthly consequences of sin.Every sin has both eternal and earthly consequences. The eternal consequence is separation from God resulting in eternal death in Hell.
Only Jesus can save you from that. But there are many earthly consequences that we will still have to deal with when we sin. If we do what is right, we can avoid being weighed down by the earthly consequences of sin so that we can more effectively fight against the spiritual forces of evil. You can’t earn your way into heaven, but if you do what is right, you can avoid a whole lot of self-inflicted, earthly pain and suffering