Obviously you refering to the HV battery. If you have the service some at Toyota they do a free hv battery test every year which carries a 12 month warranty, this goes on for 10 year. If you have a hv check before the end of the 10th year the warranty goes for another year, effectively 11 years. If you choose to have service done outside Toyota then the cost of hv check is £40.
The actual battery is made up of cells which are replaceable, so if one or two cells go down they can be replaced individually. There are now businesses specialising in replacing individual cells, either new or 2nd hand, so to keep costs down.
however, when I was doing my research into Toyota hybrid cars, I never saw a car for sale that said “new battery fitted recently” like you do when you replace an exhaust system, fit new brakes all round, 4 new tyres etc; never. And some of my research was on American sites where 250k miles was not unusual, add that with the fact batteries generally don’t like excessive heat (nor cold) meant to me hv batteries are long lasting. Obviously someone is having failures of whole lot or individual cells, or else those specialists businesses would not exist, but failure is not a “common” thing like clutch, alternator, starter motor etc, all of which Toyota hybrids don’t have. Some othe manufacturers hybrids have those things, Toyota doesn’t.
the fact Toyota hv batteries have effectively a 11 year warranty (with annual checks) shows they have full confidence in their hv batteries. Remember the Prius hv cars have now been on the uk market 20 years, the hv parts seem to have been well engineered in the first place. Obviously there will be differences in design of the Prius hv system and aYaris hv system but the same ethos will be behind the systems I would think - I never yet heard anything bad about the Yaris hv system like I not heard anything bad about the Prius and other model hv systems.
hope it helps.