2004 Toyota Corolla loss of power, dim headlights, radio flickering

Hello, I’m new but love the show!
Recently purchased a 2004 Toyota Corolla in August. Last night coming home from a show (I’m a musician), the airbag light came on, my headlights seemed to be very dim.
Eventually my car radio started to flicker and the mph and rxp meters as well as the odometer started to go up and back down and up while no juice from the gas peddle seemed to go to acceleration.
Pulled over, car kinda sputtered like it was a dying battery. Turned it off. Waited tuned it back on and it tried to roll over but sounded like a dead battery again. The interior lights worked fine, all the of symbols (oil, battery engine) flashed but no egnition, radio or lighter charge .

After a long while tried again and it started with some coaxing, made it two more miles down the road and same thing happened, radio lights flicker, dim headlights, airbag light comes on, meters go crazy, lose acceleration. Waited a while, tried it, turned on, it turned on and we sat with it idling and same process happened while sitting there after just a short time. Dim headlights, Radio flicker, airbag light, meters crazy, slow lose of juice.

It has a brand new battery, it’s a used car, I’ve been driving it with the check engine light on but have gotten it looked previously to disclose it was a sensor thing.
Recently took it to the Toyota dealership for three recalls
One had to do with the airbags
After it was worked on the second time by them for two other recalls (one had to do with the door and I can’t recall the other but am looking for the paper) my battery light came on. And has come off and on for about a week or two but with no trouble. Mostly in town driving. This trip I took was about at 40mi trip back and forth, it did fine up but coming home not so good.
I’m not sure if it’s any relation but that’s the only “repairs” I’ve had done since purchasing the vehicle

Any ideas? Alternator? Bad battery? Electrical stuff? I really don’t know much about cars just that I’m tired of my bad car-ma.
Thanks!

These are classic symptoms of a bad alternator - OR wiring problem for the same. Since the battery light came on after one of the services and it does come and go a little a simple wiring issue is a possibility. Take it back. Tell them exactly what happened including the battery light after that second service. If they come back saying its a coincidence and it needs an alternator or something you should feel completely free to go get another opinion at a local, independent shop.

A new battery in a used car followed by your symptoms… I’m going to guess that the alternator is shot and not putting out full voltage and your battery is now almost totally drained. Follow Cig’s advice. Get the battery and charging system tested. Expect that you might need an alternator.

Personally, I’d simply go elsewhere to get it tested. I have zero trust in used car dealers’ standing behind their cars. I’d be surprised if they didn’t give you a “song and dance”.

Also, check and make sure your battery connections are clean, corrosion free and tight.

By the way, that may be a normal lifespan for a Toyota alternator. I have a 2005 of high mileage, and my alternator went out last year. I knew it was going, and ordered one over the internet. Before the new one came in the old one died completely, and as soon as it went out I drove straight to the nearest trusted shop and had them change it. I never got around to returning the one I ordered, so now I have a new alternator still in the box in my garage. Since I plan to keep my car for at least 50 years, it’ll probably get used at some point.

It’s usually the brushes that go first.
I like to get a spare set to have on hand ~100k miles.
These fit Corolla & Matrix 1998-2008. They come in the holder so they bolt on, no soldering.