It is if you major in STEM (and you apply yourself and get internships, etc) - Majoring in "Eastern Gender Studies" will likely waste 4 years of your life.
As someone with a STEM degree who enjoyed taking online classes at a CC during their 20s in Art History, I wouldn't call it a waste of time; it's brought me more joy, balance, and a feeling of well-roundedness than I had contributing to os projects.
applied STEM will pay off for the investment. I still take college courses online after my Masters in CS. I really enjoy learning about humanities and arts at a cheaper CC during my free time.