In the US, if you can get accepted to a PhD, you get full scholarship, especially in STEM, but also in other fields. You can drop out in a year or two and get your masters. (I got my master's this way at Harvard, though I also finished the PhD. Nothing was required but the first year of course work and a language test.
Far less expensive and possibly less work than going directly to masters.
But if you do want to pay for a professional masters', then unlike undergrad, the specific program may be more important than the reputation of the university as a whole.