I have a friend who took a gap year between undergrad and med school (already accepted) to earn and save some money for the latter. Decided that the money-earning work was very interesting and chose to go to grad school for that rather than med school.
With that said, I have 2 friends who left medicine for other fields in their early 30s.
It is often difficult if you’ve been in single-minded pursuit of something to realize there are other things out there.