If a 2005 kia optima shut off whilst driving but the lights and radio were still on and you pulled it over and tried starting it again and it wouldn't what might be wrong?

alternator may be the issue