Why is your battery not charging when you drive?

dead battery

dead alternator

dead voltage regulator

each needs to be tested.