In our Ecclesiastes Solomon is exasperated by the same fate that awaits everyone, regardless of how they conduct their lives.
Ecc 9:2 The same destiny ultimately awaits everyone, whether righteous or wicked, good or bad, ceremonially clean or unclean, religious or irreligious. Good people receive the same treatment as sinners, and people who make promises to God are treated like people who don’t.
Ecc 9:3 It seems so wrong that everyone under the sun suffers the same fate. Already twisted by evil, people choose their own mad course, for they have no hope. There is nothing ahead but death anyway.
That is definitely a conundrum! — Someone who could be nicest person in the world, versus the most heinous serial murderer ever, is still headed for the same grave.
Solomon seems to have approached this from a perspective that is bankrupt The Gospel. If we have no hope in Christ, this is certainly something that would leave us wondering, what is the point in obedience…shouldn’t we just do whatever we want?
However, and even atheists can’t say for certain either, we don’t definitively know what happens when we die, atheists can’t say for certain that there is no God, but there is certainly a lot of evidence from the Bible. If you read the Bible, a lot of science has corroborated what has happened in the Bible. You have various artifacts that have been discovered over time that line up with exactly what the Old Testament says, prophecies that say nations will get wiped out and today they happened exactly as the Bible said it.
More importantly, there is the New Testament, the eye witness accounts of Matthew, Mark and John all spell out the same events of Christ’s life, the supernatural happenings surrounding His death and the empty tomb afterwards.
So that leaves us with two ways to approach life, we can look at it as Solomon was here, saying ‘what is the point of it all if we are all going to die anyhow’, or through the lens of the Gospel that gives a life that doesn’t end in what happens after the here and now.