When you put your trust in Jesus’ payment for your sins and commit to following Him, you are saved. Salvation is God’s gift to you. You cannot earn it, and you don’t have to “get right” to receive it.
God saved you by his grace when you believed. And you can’t take credit for this; it is a gift from God. Salvation is not a reward for the good things we have done, so none of us can boast about it.
Ephesians 2:8-9