The R&R of the window is one issue, the rot in the sill is more problematic.
You'll need to fix that, and do proper prep so it doesn't happen again. That can be a bit of work..
Best surprise I've uncovered while doing this job was new exterior trim on an existing unit turning into jackhammering out a concrete step, 24 feet of new rim joist and mud sill, jacking up the house, repairing joist ends, 200 sq ft new siding, new walk out deck,and replacing a broken picture window.. 50 bucks turned into a cha ching..