Battery Sensor Red Light On Sensor stating check Charging System 2 year old bat on 2005 Ford Explorer

Just accured drove to Alexandria & back

Asked by for the 2005 Ford Explorer
Could be the charging system sensor (i.e. the sensor that tells the light to go on) and no big deal or it could be the alternator. Mine just did this last week. The light and beep happened randomly for about two days. Then the entire electrical system went dead. Replaced alternator in hotel parking lot (three 14mm bolts, one 10mm nut, and serpentine belt removal tool) and all good now.
Thank you So----- much it was the problem!!! Car running Sensor light must be bad still coming on saying sensor default, tire extremely low. which they are not. But the car is running!