The generator is what keeps the battery charged after starting the engine. Use an inexpensive digital voltmeter to back-probe the wires through the plug and tell me what you find when the engine is running, and the wire colors.
Repair Safety Notice: This information is for general instructional purposes only. Vehicle repair can be dangerous. Verify all information, follow manufacturer service procedures, use proper tools and safety equipment, and consult a qualified repair shop when needed.