The meaning of life, per Ecclesiastes

The Bible’s book of Ecclesiastes, written by Solomon, explains the purpose and meaning of life.

Ecclesiastes says work, 9:10, and enjoy the fruits thereof, 2:24 and 3:13 and 5:18-19 and 9:7, marry and bear children if you can, 9:9, and remain faithful to God, 9:8; for all are of dust and all turn to dust in the end, 3:20.

Whatsoever thy hand findeth to do, do it with thy might; for there is no work, nor device, nor knowledge, nor wisdom, in the grave, whither thou goest.”
– Ecclesiastes 9:10

“Behold that which I have seen: it is good and comely for one to eat and to drink, and to enjoy the good of all his labour that he taketh under the sun all the days of his life, which God giveth him: for it is his portion. Every man also to whom God hath given riches and wealth, and hath given him power to eat thereof, and to take his portion, and to rejoice in his labour; this is the gift of God.”
– Ecclesiastes 5:18-19

Live joyfully with the wife whom thou lovest all the days of the life of thy vanity, which he hath given thee under the sun, all the days of thy vanity: for that is thy portion in this life, and in thy labour which thou takest under the sun.”
– Ecclesiastes 9:9

“Let thy garments be always white; and let thy head lack no ointment.”
– Ecclesiastes 9:8

“All go unto one place; all are of the dust, and all turn to dust again.
– Ecclesiastes 3:20

Therefore, in this world, enjoy what you have when you have it, and keep the commandments of God. In time to come, God may gift you eternal life.

“Let us hear the conclusion of the whole matter: Fear God, and keep his commandments: for this is the whole duty of man. For God shall bring every work into judgment, with every secret thing, whether it be good, or whether it be evil.”
– Ecclesiastes 12:13-14

By the way, Ecclesiastes 12:2-7 speaks to the day of the LORD: the Second Coming of Jesus Christ.