Proper window install contains a forged flashing plan to take care of water
https://violetmetric.com/s/3UjdKLGX-b52IllJKnJgp
Proper window install includes a solid flashing plan to manage water. Correct layering directs moisture outward and protects the sheathing and framing.