It’s hard to tell from your pictures - do your wall studs sit on a bottom plate that sits on top of your floor joists?
Also, make sure you take all the drywall off that exterior wall with the window. If you could take another picture with better lighting, we can see what we’re dealing with here.
Basically, if this is balloon framed (probably not from the pictures) it gets much more complicated. If it is platform framed (more common now), then you should be able to repair this pretty easily. You need to support the header with a temporary 2x4, remove the rotted wood, replace the wood, then take out your temporary support.
Are you keeping the window in the shower? If you are going through this and keeping the window, consider sizing it smaller. When we keep the windows in the surround, we try to raise them up closer to 5-6’ from subfloor. This greatly reduces water issues. And as I said before, get a waterproof sill pan that peaks in the center so water can exit to the exterior and over your interior surround.
Sent from my iPhone using Tapatalk