The Buddha taught that everything is impermanent, that everything must change. The desire for permanence is one of the greatest causes of suffering in life:
Probably the hardest thing to accept is the impermanence of life, which causes us to either cling to greed and desire, wanting to live as hedonistically as possible while we still can, or cling to a flowery afterlife that might not even exist.
To one who accepts impermanence, death is the backside to a sheet of paper. There would be no life without death, just as there is no happiness without sorrow.
Imagine if, tomorrow night, you were to fall asleep and never wake up again. How would you live, right now, as a final testament of who you really are?
The Buddha left the question of an afterlife, whether for or against, unanswered. This is so we may live in gratitude for the here and now, rather than speculate endlessly: