For me personally, getting a master's degree was one of the worst decisions of my life.
I have an undergrad in civl engineering, but come from a family of academics, where it was made abundantly clear to me that an undergrad was just not good enough. That means I faced tremendous pressure to go to grad school and did a masters of environmental engineering straight out of undergrad. Engineering values practical thinking and work experience, so this was actually a net loss. I also absolutely hated the academic track, spending two years in a lab dealing with sh** every day. However, I also felt that I could not undo the decision.
Since I had already resigned myself to getting a PhD (again, family pressure), I switched tracks completely, and went to law school instead. So now I was five years behind my peers.
I am turning 40 this year, and two years ago I reached the crossover point, where my cumulative earnings are finally higher than they would have been had I gotten a job straight out of school. And that only because I had a series of breaks - I graduated two years before the 2008 recession, I made partner at a profitable mid-size firm, I landed a government job later. And because I spent 10 years working 65+ hour weeks, so basically 1.5 jobs. In hindsight not worth it.
If I could do life over, I would have gotten a job straight out of undergrad. My friends that did that were buying houses by age 23 and getting married by age 25. Not a bad way to live life.