Proper window install carries a solid flashing plan to take care of water
https://sethvphc225.almoheet-travel.com/window-replacement-for-older-homes-compatibility-and-historic-considerations
Proper window setting up involves a strong flashing plan to control water. Correct layering directs moisture outward and protects the sheathing and framing.