This might sound weird but in short, time and jealousy.
At my most suicidal, I never had the means to do anything but SH. Any methods available were too painful. I basically couldn't do anything and had a lot of time to think. Eventually I came to the conclusion that I didn't actually want to die, I wanted to escape, and that my stupid fucking monkey brain didn't see any means of escape aside from death. It didn't erase my suicidal thoughts or desire, but it gave me a bit of time to reconsider while I waited to be able to get the means to CTB.
Things got a lot worse, and then marginally better for me. The important thing was that they didn't stay the same. I saw how things got better for other people - my friends, youtubers, bloggers, etc. They talked about how they got better, how they enjoyed life now. I wished I could be like them. I still do. I'm so fucking jealous of all of them that it makes me want to keep living just to get that happiness for myself, like it makes me angry almost because it isn't fair that they get better and not me despite me trying in therapy and shit. They were proof that life didn't have to suck, so why did my life suck? They always said the same thing; "it gets better". I figured I might as well keep coasting along in life to see if they were right, if I could make it out of this shithole. I wanted a taste of the "better" that seemingly everyone else got.
I'm still coasting nowadays, and I don't fully know why I'm still here - but despite now having the means to CTB I haven't attempted, if that means anything. So yeah, I guess technically things got better - just not as much as it did for those guys lol. Shit's still fucked, but not as bad as before, and I'm still here.