Medicine and nursing have very different education and career tracks.
To become an M.D. you need to complete your undergrad with a very high GPA, and other things to make you a competitive applicant for medical school. Even if you're a competitive applicant, there's no guarantee that you'll be admitted to medical school the first year you apply. Then, if you get into medical school you still have to maintain high performance, because you need to be a competitive applicant for your residency. According to statnews.com in 2016 29,000 applicants that year got matched to a residency program, but more than 8000 didn't. Then you need to pass your residency - several years where you'll work more than full time hours for low pay. The path to an M.D. is rife with potential failure and financial sacrifice. If you make it all the way to the end, then you will make more money than an NP will, but if you don't make it all the way you can find yourself saddled with an M.D. program's worth of debt but without the actual M.D. qualification that would let you pay it all back.
It's a long road, and it's a road that I wouldn't tell anyone to embark on unless they're fully committed and have a serious game plan, with contingencies in case they fail or get delayed at any point along the line.
Nursing, by contrast, can be got into with an Associate's degree, and with that qualification you can start earning a pretty respectable amount of money (according to forbes, an AAS in Nursing is the third most lucrative Associate's Degree, and even results in better wages than 75% of 4-year majors. Then a nurse can always advance their knowledge, training, and income by studying further while already working. An NP doesn't make as much as a doctor, but they also didn't have to go through 8-10+ years of making little or no money and/or accumulating debt before they could go into the workforce in the first place.
For me, the comparison was a no brainer. I have enough college funding to pay for my AAS in Nursing, debt free, and I be in the work place making pretty good money inside of two years (and RNs in my state make better than the national average, partly because we have a shortage). I'd have to go into debt to pay for med school, and I'd be looking at several additional years of lost income on top of that - for me, that's just not a managable option. Really though, I've never been seriously interested in being an M.D. I did seriously look into becoming a Physical Therapist, but the math there is even worse than for an M.D. in its way - most PTs need an entry level doctorate to practice now, and PTs only make about $15k a year more than RNs in my state, and actually earn less than an NP would.
To me, becoming an M.D. mostly makes sense for high-performing traditional students with good sources of college funding. As a non-traditional student who did ten years in the military before I ever considered going into a health field, I'm impatient to get through school and get to the good stuff where I actually get to help people. Right now, nursing has on of the best education:income ratios in the healthcare industry. Eventually that might change as nursing participates in the same credential inflation as other allied health professions (PTs once only required a Bachelor's degree to practice), but for now the advantage stands.
All of that said, a good friend of mine became a nurse even though she really wanted to be a doc, because she couldn't afford medical school, and she hated it. She'd always wanted to be a doctor, and nursing was not her thing at all. She left nursing after only a couple of years for a career in management that had nothing at all to do with healthcare. The two are definitely not interchangeable. Doctors and nurses have very different roles, responsibilites, pay, levels of respect, etc. If anyone is already really invested in becoming a doctor I wouldn't encourage nursing solely on the basis of educational requirements / career path, but if someone is just interested in a healthcare career more generally it's an important factor to consider.