The sentence is grammatically correct. It conveys the idea that life is often characterized by superficiality or emptiness (referred to as "vanity"), and it encourages people to appreciate their time on earth, love others, and recognize the impermanence of existence.
Possible rephrasing could be:
"Life is filled with superficiality. Be sure to take pleasure in your life and express love while you have the chance, as nothing lasts


