We first have to understand who God is and what sin is according to his word. Otherwise Satan will tempt us to make light of our sin. You will sin. But it’s what you do with it that separates the sheep from the goats.
Jesus is the only righteous man who can pay for our sin. His work is sufficient for the sins of the whole world. but only those sheep who walk with him have an advocate at the right hand of the father who is ready to exercise justice. But Jesus said “Go and sin no more“. Repent and believe.
So how can you know?
1) keep his commands. Strive to understand and repent and don’t continue to live in sin
2) follow him. Walk through the narrow gate along the narrow path. Stay in the light of his word and out of the darkness of the world. If you find yourself off the trail, turn around the quicker the better.