It depends on your relationship to work, relative to your outside life. The PhD in a good institution is essentially semi-supervised playing, where you are given access to resources and people to come up with and answer interesting questions. The probability of the utility and monetary value of the knowledge varies across fields significantly, and so the main point is to learn how to learn and how to identify and answer questions.
This style of PhD is a lifestyle choice and a vow of "poverty". For context, at a school like MIT or Berkeley a typical fully-funded stipend is about $30k USD annually (gross), which you will make until you finish (at age 27-30, depending on when you start). Once you run through the cost of living in the area, you start to see that some compromises must be made to your quality of life. If you have independent money these compromises are less necessary, but if you are not careful it can alienate you from peers, in the same way that having money generally means you live in a different world than others.
If your goal in a career is to make enough money or have enough stability to support your actual life (family, community, hobbies, etc), doing a PhD is not a particularly reliable path. Having one opens doors in life, but you have to value that over the alternative for the decision to make sense.
That describes how things work at American universities. The worst part is not even the pay but the idea that people doing PhD are students instead of professionals. (Some places even talk about postdoctoral students.)
Your experience can be very different in countries that see junior researchers as professionals. You get a solid middle-class salary, and while you earn less than your friends who went to the industry, your life is not qualitatively different from them. Some travel extensively during their PhD, while others have kids and buy a home.
The opportunity cost for doing a PhD is much lower in the latter system.
I traveled much more during my PhD than in an industry job before it, simply because the funding for conferences (if I had publishable research) in far-away places was more accessible than vacation money+vacation time during the industry job. Like, a conference isn't a vacation, but I did visit a bunch of beautiful places (e.g. Japan and Iceland) that I likely would not have seen otherwise.
This style of PhD is a lifestyle choice and a vow of "poverty". For context, at a school like MIT or Berkeley a typical fully-funded stipend is about $30k USD annually (gross), which you will make until you finish (at age 27-30, depending on when you start). Once you run through the cost of living in the area, you start to see that some compromises must be made to your quality of life. If you have independent money these compromises are less necessary, but if you are not careful it can alienate you from peers, in the same way that having money generally means you live in a different world than others.
If your goal in a career is to make enough money or have enough stability to support your actual life (family, community, hobbies, etc), doing a PhD is not a particularly reliable path. Having one opens doors in life, but you have to value that over the alternative for the decision to make sense.
(I have a chemistry PhD)