Toyota technician arrived and determined that the problem was a battery issue that needed to be replaced. He said it's a common problem with his Yaris. They charged the battery, and then I took the car to their service centre, where the battery was replaced. In the service centre, I met another person who had a similar problem with their Yaris and had the battery replaced. I never received a root cause from Toyota, only a generic it's a cell fault, so the battery needs to be replaced.
Toyota, by the way, was hesitant to honour their warranty and told me that battery issues could be caused by poor maintenance, which makes no sense given that it is a brand new car that has been well maintained.