ANimac, it's from Ecclesiastes 1, but it only gives half of the story. This book is basically about the futility of human life and values, written by Solomon, King David's son who was renowned for his wisdom, but the final chapter shows Solomon's conclusions about how to live life. Here's the full Chapter 1 and after that the end of the book, Chapter 12 (but I recommend reading the entire book).
Ecclesiastes 1 New Living Translation (NLT)
1 These are the words of the Teacher,[a] King David’s son, who ruled in Jerusalem.
Everything Is Meaningless
2 “Everything is meaningless,” says the Teacher, “completely meaningless!”
3 What do people get for all their hard work under the sun? 4 Generations come and generations go, but the earth never changes. 5 The sun rises and the sun sets, then hurries around to rise again. 6 The wind blows south, and then turns north. Around and around it goes, blowing in circles. 7 Rivers run into the sea, but the sea is never full. Then the water returns again to the rivers and flows out again to the sea. 8 Everything is wearisome beyond description. No matter how much we see, we are never satisfied. No matter how much we hear, we are not content.
9 History merely repeats itself. It has all been done before. Nothing under the sun is truly new. 10 Sometimes people say, “Here is something new!” But actually it is old; nothing is ever truly new. 11 We don’t remember what happened in the past, and in future generations, no one will remember what we are doing now.
The Teacher Speaks: The Futility of Wisdom
12 I, the Teacher, was king of Israel, and I lived in Jerusalem. 13 I devoted myself to search for understanding and to explore by wisdom everything being done under heaven. I soon discovered that God has dealt a tragic existence to the human race. 14 I observed everything going on under the sun, and really, it is all meaningless—like chasing the wind.
15 What is wrong cannot be made right.
What is missing cannot be recovered.
16 I said to myself, “Look, I am wiser than any of the kings who ruled in Jerusalem before me. I have greater wisdom and knowledge than any of them.” 17 So I set out to learn everything from wisdom to madness and folly. But I learned firsthand that pursuing all this is like chasing the wind.
18 The greater my wisdom, the greater my grief.
To increase knowledge only increases sorrow.
Footnotes:
a. 1:1 Hebrew Qoheleth; this term is rendered “the Teacher” throughout this book.
Ecclesiastes 12 New Living Translation (NLT)
12:1 Don’t let the excitement of youth cause you to forget your Creator. Honor him in your youth before you grow old and say, “Life is not pleasant anymore.” 2 Remember him before the light of the sun, moon, and stars is dim to your old eyes, and rain clouds continually darken your sky. 3 Remember him before your legs—the guards of your house—start to tremble; and before your shoulders—the strong men—stoop. Remember him before your teeth—your few remaining servants—stop grinding; and before your eyes—the women looking through the windows—see dimly.
4 Remember him before the door to life’s opportunities is closed and the sound of work fades. Now you rise at the first chirping of the birds, but then all their sounds will grow faint.
5 Remember him before you become fearful of falling and worry about danger in the streets; before your hair turns white like an almond tree in bloom, and you drag along without energy like a dying grasshopper, and the caperberry no longer inspires sexual desire. Remember him before you near the grave, your everlasting home, when the mourners will weep at your funeral.
6 Yes, remember your Creator now while you are young, before the silver cord of life snaps and the golden bowl is broken. Don’t wait until the water jar is smashed at the spring and the pulley is broken at the well. 7 For then the dust will return to the earth, and the spirit will return to God who gave it.
Concluding Thoughts about the Teacher
8 “Everything is meaningless,” says the Teacher, “completely meaningless.”
9 Keep this in mind: The Teacher was considered wise, and he taught the people everything he knew. He listened carefully to many proverbs, studying and classifying them. 10 The Teacher sought to find just the right words to express truths clearly.[a]
11 The words of the wise are like cattle prods—painful but helpful. Their collected sayings are like a nail-studded stick with which a shepherd[b] drives the sheep.
12 But, my child,[c] let me give you some further advice: Be careful, for writing books is endless, and much study wears you out.
13 That’s the whole story. Here now is my final conclusion: Fear God and obey his commands, for this is everyone’s duty. 14 God will judge us for everything we do, including every secret thing, whether good or bad.
Footnotes:
a. 12:10 Or sought to write what was upright and true.
b. 12:11 Or one shepherd.
c. 12:12 Hebrew my son.
https://www.biblegateway.com/passage/?search=Ecclesiastes%2012&version=NLT