I’ve had a similar issue with a mates hilux ..fault was the wiring loom from alternator close to engine block that had worn through harness due to vibration etc …wire in loom was either contacting ground or broken ….not much to go on my memory isn’t the best but worth a look …follow the loom and inspect 👍