Following Solomon’s conclusion that there is no life after death, Solomon now says to live your best life now!
Keeping in mind here that Solomon’s Ecclesiastes is based on his earthly observations, since Solomon didn’t see the afterlife when he wrote this, he has seemingly concluded that when we live we live, and when we die, that’s the end, so here is telling us to live it up:
Ecc 9:7 So go ahead. Eat your food with joy, and drink your wine with a happy heart, for God approves of this!
Ecc 9:8 Wear fine clothes, with a splash of cologne!
Ecc 9:9 Live happily with the woman you love through all the meaningless days of life that God has given you under the sun. The wife God gives you is your reward for all your earthly toil.
Ecc 9:10 Whatever you do, do well. For when you go to the grave, there will be no work or planning or knowledge or wisdom.
Some good pearls of wisdom in there for sure; while Solomon says it’s over when it’s over, he encourages us to enjoy our time with our spouses, and our families, because we don’t know how long we will have them. Death is the one thing that is inevitable and doesn’t have a calendar date, we have no idea when we or our loved one’s will be called home, so best to enjoy the time with them while we have it.