You maybe disheartened by falling into the same sin over and over again even though you try to better yourself and the Shaytan will use this to make you loose hope in trying to better yourself by telling you, you can never change. But I’ve found that even though, your not
supposed to loose hope in the mercy of Allah, you begin to lose hope in yourself and one thing that has helped me rectify it, is everytime you do that sin, even knowingly, do a good deed straight after, just a small one maybe make adhkar, maybe read Surah ikhlas, just something
anything and I promise eventually you’ll get yourself out of that habit you thought you’de never be able to break. And you’ll have helped yourself along the path.