Only purpose a battery has on vehicle is that it helps in starting and then for rest of the driving time, it charges its self via alternator and second purpose is that it powers the other instruments once engine is off just like UPS works at home.
So if starting is ok then you have to cross check and diagnose if alternator which people commonly refer as generators is working fine or not and try to figure out a voltage drop once on the head lights are turned on. Automatic Voltage Regulator on Alternator might be little sluggish as it can drop the voltage and then regains it after few second which you may experience.
If that’s not the case then it may be aftermarket wirings or might be a possible short from somewhere.
You need to diagnose first in-order to be sure. At times a bad head light bulb can recreate same symptoms and drains far more power than expected.