At Ecclesiastes 11:9 it reads: “Rejoice, young man [or, woman], in your youth.”
... However, to achieve this ‘rejoicing’ the Bible urges in the following verse: “Remove vexation from your heart, and ward off calamity from your flesh; for youth and the prime of life are vanity.”—Ecclesiastes 11:10.