My battery light came on while driving, everything
working. 2008 jeep grand Cherokee
Battery light really means that the alternator is weak or failing. Soon you will have a dead battery so don't turn engine off until you get where you're going. I would head to an auto parts store to have alternator tested, buy a new one, and get home to put it on. You might need a jump start. You might be able to drive an hour or so on battery alone.
Nine times out of ten when battery light comes on the alternator is not charging other one percent blown alternator fuse or wiring problem.
Test the alternator output at the battery. I would want to see anywhere from 13.5 to 14.5 volts. If all you get is 12.5 or less the alternator is not doing anything.