The oath doesnt say "dont do any harm at all" it says "abstain from all intentional wrong-doing and harm, especially from abusing the bodies of man or woman" - causing pain in attempts to fix the body has very much been in the realm of medicine since the oath was first coined.
The modern Hippocratic Oath says that. The original one Hippocrates promulgated and the ones taken by European physicians followed for centuries afterwards explicitly prohibited things like surgery.
"I will not use the knife, not even, verily, on sufferers from stone"
Pre-antibiotics and pre-clinical trials that wasn't as unreasonable a position as it would be now. Of course some European medical workers did perform surgeries, just lower class ones who didn't take an oath.