Obedience to God's commands is a marker of spiritual growth. 1 Corinthians 2:14 says, "But the natural
man does not receive the things of the Spirit of God, for they are foolishness to him; nor can he know
them, because they are spiritually discerned."
In other words, someone who doesn't have the Spirit of Christ in them has no interest in God and doesn't obey His commands. Instead, they give in to all their natural impulses, many of which lead them into sin.
On the other hand, if you have God's Spirit in you, you will resist the sinful impulses that rise up in you. You won't do it perfectly. There will be many times when you still sin. But if your faith is getting stronger, you will find yourself increasingly resisting the temptation to get angry, gossip, lust, worry, etc.