Alternator issue?

This morning my car, 2000 Toyota Camry didn’t start as I was driving. Saw the headlights, dash lights, started to die out. Luckily I had gotten to my friend’s house for how early and dark it was. I bought my new car battery from costco February of this year. The check engine light came on 2-3 months ago and checked it was some corrosion. After clearing that the battery light would go on but with my car battery tester it showed it was 100% charged. About 2 weeks ago I took it into Firestone for my usual alignment and wanted the battery checked. It was listed as, “in good condition” and fully charged. So what happened? Its corrosion free and fully charged but what happened?