This wire is often associated with the ignition or starting circuit when the switch is engaged.
This component converts the AC power from the stator into DC power to charge the battery and run the lighting. On the wiring diagram, this is often a box with fins (for cooling). If your bike is blowing bulbs frequently, the diagram will help you trace the wires from the stator to this unit to check for faults. Ktm 450 Exc Wiring Diagram
Do not rely on blurry forum screenshots. Here are the best sources: This wire is often associated with the ignition