After I was born again, the LORD Yeshua delivered me from some bad habits. Then, I made some good-intentioned, but unwise choices which led me to fall back into a bad habit that plagued me for years. I was freed from this in two parts.
The first part was trusting God and doing what he said in his word, the Bible, even though the ‘church’ group I was a member of did not condone it. The second was understanding from the book of Romans that the key to live as a born again Son of God was the ability to communicate with and follow God our Father through his Holy Spirit (The law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death.). I learned that I could ask God questions, and he would often put the answers in my heart. At that point, I had to test the spirit who gave the thought, asking whether Christ is the LORD and whether he is come in the flesh. If the answer was Yes, then I could accept the idea as from God. If not, then not.