After driving on the highway at 80mph, car shut down after stopping at a light on 2002 BMW 325i

the battery light light and the engine light, the car did restart and I did not encounter the problem until a day later.

Asked by for the 2002 BMW 325i
Need to have the charging system tested. Sounds like a bad battery or alternator.