If you join first, you will incur a service commitment and will need to train. If you go active duty, you will delay med school for 4 years. If you go reserve, you're giving up 2+ years as you will need to training first as well as attend your MOS/job training school, during which you would not be able to interview, hence why 2 years is the minimum (training year, and then application year). If this option was taken, you'd begin med school after 2 years are complete, but would have 4 years of reserve service remaining, lasting the during of medical school. You would lose 1 weekend per month for training which would affect you with school and exams and is not ideal by any means.
You can do med school first, and then choose to enlist/commission after directly. There are some programs available to do this during residency, otherwise it would be after residency.
You can do both at the same time via HPSP where you would be commissioned up front, training during summers, and apply for the military match. You're technically serving during this time, but not really other than summer training. Then if you match in the military, youre residency would be while active duty. There are cases where you can do the civilian match where you'd enter the same match as everyone else, but you'd be "inactive" during residency, and your active service obligation would be deferred for after residency when you'd then be active duty.
If you'd like anything clarified, let me know or any one else who has commented know!