I think this is generally a good mantra but not a catch-all.
Work can be done in an evil or nonproductive way. Working hard towards something that isn’t important isn’t a good way to spend your life. Bill gates works pretty hard I would imagine.
I was reading a text by John Steinbeck that said at the end of a man’s life, he thinks of whether his life was spent in good or evil. If people are happy that you’re dying, then it wasn’t a good life but if people are sad, then your life was spent well.
Life should be spent towards good and away from evil.