What an interesting question, even if it appears to be phrased from a pessimistic point of view. Perhaps, even from a perspective of an inevitable doom.
If we follow your logic, then there would be no point of anything at all, to be frank.
Just take this life - we will all die anyways. So, what would be the point of going to school, working, getting married, starting a family and then go through old age when we all know that we will eventually die? Some may even die faster, earlier and younger. We just don't know when or how. But the only certainty is that we will definitely all die.
If we take such negative extremist view, then none of us should be even bothered with staying alive.
Then we don't really understand Karma and Dharma.
Karma does not leave us even after we die. It continues and countless lifetimes will ensue as it has previously done since beginningless time.
We are basically governed by two most important dates in each lifetime the year we are born and the year we die. In between that dash that defines what we have done and how we have lived. We can't control our birth and death, unless we are high lamas. But we can make full use of our time while we are alive to achieve a higher practice that allows us to become something much more.
At every stage and phase in life, the karma changes accordingly. It is no different than us, as individuals. So, collectively, the world has its own karma. Because together, we all have brought it on. Collective karma.
If we do understand karma, then we would not stop wasting time on things which will not bring ultimate benefit. We would focus on everything that benefit us and those around us the most. Yes, there will come a time when Dharma is lost because people have degenerated so much. Then, wouldn't it make perfect sense for us to make full use of our time now? Especially when we do have access to all the precious teachings and great teachers. Wouldn't it make sense to practice harder now when we still have the chance to do so?
Why?
So that when the time of darkness arrives, although the world may reside in darkness, but we would not be living in that darkness. Because we have practiced Dharma well, we have maintained our vows well and kept up our spiritual practice, we become light unto ourselves. Then we need not be lost in the dark, we are our own light. Furthermore, we may even help others around us because we can light up the path before them.
True spiritual practice never leaves us. If we put in the time and effort, we will see our spiritual progress. Then we will have real attainments and realizations. And they do not leave us after we die. We carry them forward onto our next life. And if we continue to build in this way, in time, we too will become highly attained like our Gurus and the high Lamas. If they can control their death and rebirth due to lifetimes of practice, so can we. This is the whole point of Dharma. Releasing and realising the Buddha within until we become the Buddha.
And we should always aspire to achieve this as soon as possible. Without delay. With a great sense of urgency.