In any profession, you can become a highly qualified professional, or an average statistical specialist. It all depends only on you: your personal interests, goals, desires, inclinations. How can you compare 2 completely different professions, advise you something without knowing absolutely nothing about you? I won't risk it. There are promising areas in both areas, in medicine they are dentistry, surgery, dietetics, cosmetology, pediatrics, etc., good programmers are now also extremely in demand.
If you cannot decide, then take vocational guidance tests. Here are some interesting ones.
Also learn more about the healthcare and IT professions. In the directory to which I have thrown off the link, you can filter professions by perspective (in demand, professions of the future, outgoing professions). Very comfortably. Hope you find it useful :)
To begin with, I would say that dividing these professions (if not all of them at all) into categories "better or worse" is a stupid idea. Don't be rude. It doesn't take a genius to see the huge difference between the two. Surely you can say, “But how? Aren't the ability to analyze, patience, ingenuity and developed intelligence necessary for both professions? ”, With which I agree. But (!) It should also be borne in mind that a doctor will definitely have to contact many different people, among whom there will be those assholes. To become a programmer, you do not need to get a higher education, but to become a doctor you need to unlearn 6 years at the university and 1-2 years on an internship. I am silent about the salary, everyone here knows everything. Work in the IT sphere is more promising in this regard. Also, young doctors without connections will clearly have problems with employment. In general, what is all this water for? If you like programming, do it. Medicine is interesting - everything is the same.
The programmer is unambiguous (if we are talking about Russia). Russian medicine has no prospects in the coming decades. It will only get worse. I do not recommend choosing the profession of a doctor. I speak like a doctor. I know medicine from the inside.
Definitely a programmer. If you were to choose, say, between medicine and a related biomedical discipline, then you could still seriously think about a medical career. With such a dispersion of interests in medicine, you will not survive. Moreover, given the apocalyptic horror that is happening now in medical education and medicine in general, I would not advise anyone to become a doctor.