The one failure that matters
A vacuum flask has exactly one meaningful failure mode: it loses its vacuum, usually because a dent breaches the inner wall. When that happens the flask still holds liquid and no longer keeps it hot, which means it has stopped being the thing you bought.
Stanley publishes a lifetime warranty on its stainless vacuum products covering defects in material and workmanship and specifically including degradation of thermal performance. That is unusually precise and it covers the actual failure.
YETI publishes five years on Rambler drinkware.
That is not a close comparison on paper, and the paper is the reason this page exists.
What YETI is genuinely better at
Build and finish. The DuraCoat exterior resists chipping better than most powder coats, the machining is tidier, and the lids seal more precisely.
The lid ecosystem. Chug caps, straw lids, magnetic lids - all interchangeable, all sold separately. That makes the wear parts replaceable, which is a real durability property independent of the warranty.
Dishwasher safe, which a surprising number of insulated bottles are not.
What Stanley is better at
Heat retention, by mass. The Classic is a big, thick flask. It holds heat for a genuine working day in a way a 26oz bottle cannot, simply because there is more of it.
The cup lid. The screw-on cup means you need no second vessel. It is a hundred-year-old design and it remains the right one for a flask you carry to a job site.
Parts. Stoppers and lids are available, which matters because the stopper is the wear item and does eventually leak.
The Quencher, separately
The 40oz tumbler that became a phenomenon is covered by the same Stanley lifetime warranty on its vacuum body - but a tumbler has more failure points than a flask. The lid, straw and gasket are consumables and are not warranty items, and it is not leakproof when tipped.
It is a very good desk vessel and a poor bag vessel, and most of the complaints about it come from people using it as the second thing.
The verdict
Stanley Classic for a work flask. The warranty names the failure mode, the cup-lid is self-contained, and it holds heat all day.
YETI Rambler for a daily carry bottle where the lid options and the finish matter more than the term - and knowing that the term is five years, not forever.
If what you actually want is cold water in a bottle you do not think about, the Nalgene page is linked below and that bottle costs a fifth of either of these with a lifetime guarantee.