The purpose of life

Is to die in a horrible way. Then you cease to exist, so everything you did was meaningless. If you don’t cease to exist, you reincarnate, which isn’t any better. Zero memory of anything, so everything you did was meaningless.