A student loan is borrowing now against the higher income a degree is supposed to bring later. Whether it pays off is genuinely a math question, not a slogan: a manageable loan for a degree that meaningfully raises your earnings can be one of the better uses of debt — while a large loan for one that doesn't move your income can follow you for years. The degree isn't automatically worth it or not; the numbers decide.
When the expected boost to your lifetime earnings comfortably exceeds the total cost of the loan, including interest. A degree that opens a higher-paying field, taken on with a loan you can realistically repay, is closer to 'good debt' — borrowing that builds an asset, in this case your earning power.
When the loan is large relative to the income the degree actually produces. Borrowing heavily for a path that pays modestly means years of payments eating into a paycheck that the degree barely raised. The danger isn't the degree — it's the mismatch between cost and payoff.
Look up realistic starting salaries for the field, total cost including interest, and what the monthly payment will be against that expected income. Borrow what the outcome can support, prefer lower-cost options, and treat the decision like the investment it is.