The window is rarely the leak. The flashing is.
Most water problems after a window replacement don't come from the glass or the frame. They come from a rushed or backward flashing job that lets water get behind the wall's weather-resistant barrier instead of over it.
The shingle-lap principle
Department of Energy guidance on window flashing describes an overlapping sequence, much like roof shingles: side flashing installed so it extends over the sill pan flashing, and head flashing installed so it extends over the side flashing.[1]
Water hitting any layer in that stack drains down and out onto the layer below it, rather than finding a seam to slip behind. Reverse the order and every seam becomes a place for water to collect instead of shed.
The sill pan comes first
A sill pan starts with a back dam, a raised strip along the interior edge of the rough opening, followed by a self-adhered membrane or formable flashing shaped to bend at the corners so one continuous piece covers the bottom and both sides of the sill.[1]
Materials vary: rigid sheet metal, flexible self-adhered membranes, or a fluid-applied, asphalt-based coating brushed or rolled on. All of them are doing the same job, which is giving any water that gets past the window a way out instead of a place to pool.[1]
One detail homeowners rarely know to ask about: a properly built sill pan is not caulked shut. Caulk at the head and side jambs is normal; caulk across the sill blocks the drainage path the pan exists to provide.[1]
The order that protects the wall behind the window
The Department of Energy's Building America guidance lays out roughly this sequence: prepare the housewrap around the rough opening, install the sill pan flashing, caulk the head and side jambs only, set the window, apply jamb flashing that extends about 4 inches above the head flange, apply head flashing extending about an inch beyond the jamb flashing, fold the housewrap back over the head flashing and tape the seams, air-seal the interior gap with backer rod and caulk, and finish with exterior trim topped by its own cap flashing.[1]
Skipping steps, or doing them out of order, is exactly how a window that looks fine on day one starts showing water stains eighteen months later.
None of this shows up on a glossy brochure, and most of it is invisible again within an hour of the crew finishing up. That's exactly why it's worth asking about before the trim goes back on, not after.
Sealant has one job on the outside and a different job inside
Exterior caulk at the head and side jambs is a weather seal; it keeps wind-driven rain from working its way in around the frame. The interior gap between the window and the framing is a separate seal, closed with a backer rod and caulk to stop air movement rather than water.[1]
Confusing the two, or skipping the interior seal because it's hidden behind trim, is how a window ends up drafty even when the exterior caulk line looks perfect.
What to ask a crew before they close up the wall
Ask to see the sill pan before the window goes in, not after. Ask what they use for it and whether it wraps the corners in one piece. Ask whether they caulk the sill. If a contractor can't answer these three questions without hesitating, that's worth weighing against how good their quote looks on paper.