How can I change and stay focused on the Lord?

It’s been a while since I decided to change my religion to get closer to God. I want to change myself from disobedient to obeying the word of God. But I always have a doubt. How can I change and stay focused on the Lord? I always pray and pray, and he never answers my prayers; that’s why I feel hopeless sometimes. I am ashamed of what I did to God for not following His commandments. I always commit sins against his law.
I need to learn how to start again. I want to ask God for forgiveness because I am a sinner.
Please advise me on how I can return to Jesus again.