Proper window installing entails a good flashing plan to organize water
https://sethvphc225.almoheet-travel.com/window-replacement-for-older-homes-compatibility-and-historic-considerations
Proper window install includes a forged flashing plan to handle water. Correct layering directs moisture outward and protects the sheathing and framing.