People do not graduate with a STEM PhD with hundreds of thousands in debt; that is not how the education system works pretty much anywhere in the world.
Your PhD might not put you into hundreds of thousands of debt, but your undergrad very much might in the US. And then you'd have to choose to start a PhD while having hundreds of thousands in debt.