I used to do a sin that really destroyed my soul and i did it for 5 years very often. But Alhamdiullah I have stopped with it. But as I am trying to get closer to Allah swt. I get a feeling like someone is trying to push my iman down and put doubts into my heart. But I have 100% yaqeen that Allah swt exists and he sustains me but I am not sure why I am getting thoughts of this. Is it because of my past sins and how long until my soul becomes cleansed once again?

We are definitely influenced by our past mistakes, which sometimes take a long time to repair. Thus, doubt, temptation and struggle persist. Yet, even in the absence of sin, doubt is a human weakness, and it is a test of a believer. This is because our reality and everything that sustains us is restricted to this world. However, when you detach from it and reduce your dependence on things, that’s when your heart starts to achieve true certainty. Try to disconnect from things, like walking away from your phone for a few hours, or reassessing what you actually need versus what you desire. The cleansing of the self is a perpetual process, it never stops, just try to move in the forward direction, and if not that, then don’t go backwards