I don't know what happens.
There's yt video called "Is there life after death? 50 years of research at UVA" that discusses the topic. A few of the cases they mention are pretty uncanny. I find it at least plausible that there is reincarnation in at least some cases, I'm not sure if it would apply to everyone.
If there's an afterlife which is determined by the bad or good deeds you do, then I think I'll probably be ok. If there's no afterlife, then I can accept that too. I'm mostly not worried about it because of this.
It's a more relevant issue if you're planning to kill yourself. In the Hindu tradition, killing yourself is considered the worst sin, and if you die by suicide, then whatever burden you carry in this life, you'll carry a greater one in the next life. That seems pretty harsh and unfair, especially if someone is already dealing with a terrible burden, but that's what they think.
I think Buddhists have a slightly different take, but I'm not sure what it is.