You should not get a PhD for the money. That's always been the case. It's a research degree. If it will open doors for the type of work you want to do, that's the only time it's worth it.
Traditionally, the reason to get a PhD was that it was the only way to get an academic job. In 2023, I don't recommend academic employment. Sadly, it's just another type of employment today. I started my first academic job in 2002 and things were different back then.