People that had depression before marriage / kids. Did it help your depression when achieving those things?

I’ve always wondered, cause a lot of single people are depressed, lonely, sad, etc…and think having a partner and kids will be the answer. I’ve also heard people who already have these things say something along the lines of “no, if anything, all of that exacerbates it”.

Also I know I’m kind of throwing the term “depression” around casually with this post, as depression and loneliness/sadness can be different concepts but I’m still curious to hear people’s answers on what they went through before and after partner / kids.