Why does anyone have children if they are just going to die? Why write or read a book if its going to end?
The end of time or the world does not preclude the goodness of it all while it exists. However, God did not create us to die, He created us for eternal life. It is because of our own sins that we face death. If God had stopped the world after the first humans sinned then none of us would be here now or in heaven.
If God had created us differently then we would be different, we wouldn’t be human we’d be either angels or some other creation. God can bring good out of any situation.