Not taking away from your point, but just a PSA: For some reason "First, do no harm" is synonymous with "Hippocratic Oath" in pop-culture. Just a reminder that this is apocryphal: https://en.wikipedia.org/wiki/Hippocratic_Oath
Surgeons, in fact, often begin with harm. To replace a hip joint, they necessarily must begin by causing great trauma to the body by cutting it open and removing bone.
That's far too literal an interpretation of harm. The point isn't to never do any kind of "physical harm". It's about doing the least amount of harm possible/necessary in any situation, where doing nothing can also be seen as causing harm.
I had a burst appendix as a teenager, leading to peritonitis. To treat this, surgeons were going to operate laparoscopically to remove the appendix and fix remove any contamination in the peritoneum. Obviously this required damaging my skin, removing an organ etc. which in the strictest sense is harm. But doing nothing at all would obviously lead to sepsis and death, so this was still the least harmful intervention. During the surgery, it turned out that the laparoscopic method was hard to carry out due to obesity and other factors. The attending made the decision to convert to a laporotomy, doing even more harm to my skin and leaving me with a 30 cm scar on my stomach. But it was the right call because it maximised the chances of accomplishing the goal of the procedure(preventing imminent death), minimising the risk of serious complications.
And here I am almost 20 years later. I have a scar, I have some adhesions that occasionally cause moderate abdominal pain if I don't eat enough fibre, and perhaps my lymphatic system and gut flora are very minorly compromised in some nebulous way due to the lack of an appendix. On the other hand, I'm alive. So yes, they "did harm", but they also minimised harm. And they didn't do any unnecessary harm, to the best of their ability. And that's the point of the ethical principle.
Surgeons, in fact, often begin with harm. To replace a hip joint, they necessarily must begin by causing great trauma to the body by cutting it open and removing bone.