There's no difference between the two for me. If nobody will miss me when I'm gone, then I functionally never existed at all. Therefore, it won't matter if I killed myself right now. Even if you'd be shocked at first, nobody will remember next century.
If there's no point to living, then I don't want to live.
It's the primary reason I'm so religious; I just want someone to miss Earth when it's gone.
Well, there is a difference, in that what matters in this world is determined by what you decide matters in this world.
There's an interesting question to ponder. What does it matter that someone misses or remembers me, Sehnsucht, after I perish, or that no one will remember me centuries from now?
I am alive right now, and will continue to be alive until I am not. If my experience ends with death, then there will be no "me", no observer, that will lament that I am gone and/or missed, no subject to experience joy/sorrow/anger/ambivalence/etc.
If my experience does not end, then depending on what this post-life experience is like, I'll have to adjust my bearings and see what there's to be done. I do not currently have knowledge or experience of this post-life state, so I cannot prepare for it, so I cannot (and need not) worry about it during my lifetime.
As a result of these things, I'm not personally concerned with questions of legacy and remembrance.
But if you are nonetheless concerned about legacy, then you can strive to build one -- something you can't do if you off yourself before you have the chance to try.
It does not matter if you live, it does not matter if you die. It does not matter if you are remembered, it does not mattered if you are forgotten.
It only matters if you decide these things are worth mattering. This is not something I or anyone else can decide for you. It is a question that I will leave in your hands.
But if you want some input as to this question, I would be glad to assist with what I know of these things. It doesn't matter if I do or do not help you, but I
want to help you if you ask me of it, because I value helping others, because helping others benefits me and others in the short and the long term, and I appreciate these benefits because I value the quality of my lived experience because I enjoy being alive.