The MS is considered an academic degree is and a wise decision if you plan on continuing your studies to the doctoral level.
The MPH is a professional/ terminal degree and is more applicable to working in the field directly post graduation.
The former is more research oriented and often includes a thesis, the latter is more application oriented and often includes fieldwork.
Regardless, both can be the first step towards a PhD or a DrPH.