There are lots of ways to do it.
I run one wire pair from the hub to the fork crown, attach the wires to the fork blade with zip ties. Have a set of quick connectors at the fork crown on the end of those wires. I used 2.8mm quick connectors.
When I use a charger, I have wired my charger so that the two wires have each a male and female quick connect fitting, that allows me to plug my charger into the wires at the fork crown and plug my headlamp into the other two quick connectors on the charger wiring. This way both light and charger are wired parallel, to charge I turn off the headlamp. When I want light I turn on the headlamp and the headlamp sucks up almost all the power.
In the photos, it is not that clear cut, but the wiring does do what I described above. But it is a bit more complicated in the photo because my bike computer wire (wrapped around the brake cable) and other things in the photo add some confusion. In the first photo, the wiring to the charger goes up to the top of the photo, wiring to the light goes to the right edge of the photo.
The wiring looks pretty sloppy in the 2nd photo because the light and charger were installed on the bike for a two week tour, both devices were removed immediately after that two weeks. Thus, I did not spend much time trying to make it look better.
I am not saying this is the way to do it, I am only saying this is one way to do it. This way, there are only two wires, not four, going down to the hub.
The photos in my previous post were of my Nomad. These photos are of my Sherpa.