In an early episode of the Orville, Gordon and Isaac get into a prank war which culminates in Isaac removing Gordon’s leg. This is treated as going a little bit too far but ultimately harmless and funny.
In Star Trek, they tend to prefer to mitigate risks protectively with things like anti-grav harnesses and holodeck safeties, except for exceptionally reckless individuals like James T. Kirk and Jason Vigo.
In that episode of the Orville, Gordon was able to get a new foot grown fast enough that it wasn’t really an issue.
In contrast, in TNG, Worf sustained an injury from a relatively minor industrial accident which left him paralyzed and could only be fixed by a radically dangerous and experimental medical procedure. In Voyager, Vidiians stole Neelix’s lungs and it took a Vidiian to alter one of Kes’s lungs to become compatible.
I don’t think the Federation’s medical technology is that advanced, especially with the banning of genetic manipulation.
Edit: And here I am forgetting about Nog’s amputated leg, which was not a perfect regrowing and caused Nog to experience phantom pain from his severed limb.
They seem to be able to repair homogenous tissue extremely quickly, but complex micro-structures are much harder to produce. Nerves, lungs, all complex.
Heck even producing Romulan ribosomes was beyond them.