Want to switch from computer science but I'll be so old

I really want to switch to medicine. I am currently a software engineer and have a plan to switch over. I'm currently 24 and would probably start early as possible when I'm 26, after getting my prereqs.

I have a side hustle that could probably net me $4k a month.

But if I go the med school route, I'll likely start working at 35 ish. How do you guys deal with this?

I want to be able to support my family before that.

Thinking whether it's the right choice to make.

Salary right now: $150k