You need to see that after a person is baptized with the Holy Spirit, and gets to know God, that person can’t sin. Read the following Scriptures carefully
Galatians 5:16 “Let me put it like this if you are guided by the Spirit you will be in no danger of yielding to self-indulgence…”.
(1 Corinthians 6:9-19) “You know perfectly well that people who do wrong will not inherit the Kingdom of God: people of immoral lives, idolaters, adulterers, catamites, sodomites, thieves,
usurers, drunkards, slanders and swindlers will never inherit the kingdom of God.”
(Romans 6: 10 - 11) “When He died, He died, once for all, to sin, so His life now is life with God; and in that way, you too must consider yourselves to be dead to sin but alive for God in Jesus Christ.”
(Romans 8: 4) “He did this in order that the law’s just demands might be satisfied in us, who behave not as our unspiritual nature but as the Spirit dictates.”
(Romans 8: 5) “The unspiritual are interested only in what is unspiritual, but the spiritual are interested in spiritual things. It is death to limit oneself to what is unspiritual, life and peace can only come with concern for the spiritual.”
We know that anyone who has been begotten by God does not sin, because the begotten Son of God protects him, and the evil one does not touch him.” So then, brothers, there is no necessity for us to obey our unspiritual selves or to live unspiritual lives. If you do live in that way, you are doomed to die; but if by the Spirit you put an end to the misdeeds of the body you will live.”
Hebrew give us some understanding that it isn’t the person who can’t sin, but the Holy Spirit who lives in a person who won’t let the person sin. Paul does a good job of explaining all this in Romans 7& 8
(Romans 8: 9 - 13) “Your interest, however are not in the unspiritual, but in the spiritual, since the Spirit of God has made His home in you. In fact, unless you possessed the Spirit of Christ you would not belong to Him. Though your body may be dead it is because of sin, but if Christ is in you then your spirit is life itself because you have been justified; and if the Spirit of Him who raised Jesus from the dead is living in you, then He who raised Jesus from the dead will give life to your mortal bodies through His Spirit living in you.”