2015 Chevrolet Trax charger light

I was idling in a restaurant drive-in window and I noticed my charger light came on in the dashboard; the car only has 29,000 miles; I am wondering if the gas I filled up with the day before is causing this light to come on. I drove the car about 10 miles and it worked fine; stopped and turned off the car; went into the store, came out 5 minutes later, started the car and the light came on again.???

I think you mean the light for the alternator. Gas would not affect that.
If your alternator has failed, expect a dead battery very soon. You can have it checked at most auto parts stores for free.