Change my distributor on on 99 Honda Accord because the seal was bad and was leaking oil

After I change it the car doesn't what to turn on like the batter is dead. The dash lights are faded. Then when it turn in I go to turn the headlight on and the rpms drop and go back. Test the battery and it gives 12.7v. Change the alternator a couple of months ago. Any ideas?

Check all the earth bonds, the "grounding straps" between engine - chassis/body - gearbox - battery etc.

Some are often on bare bolts low down and suffer corrosion, also the ones between the engine or gearbox and chassis are under constant vibration and can simply crack off over time.
All the connections need to be bright metal to bright metal, no rust or tarnish.

They are a common cause of all sorts of erratic electrical problems on older cars.

If in doubt, fit extras - they are easy to get at any motor parts place or ebay:
https://www.ebay.co.uk/...pell_check

Okay