I have the exact same problem, one day I will disassemble the whole headlight block to check all connections. But it is such a minor inconvenience that I procrastinate.
In my view the headlights are a major safety plus, they are bright and makes you being seen better and earlier.
Checking the wiring and connectors is not that big a problem (at least at my '22 Ribelle).
You need: Allen keys 5 & 6 mm, knife or sharp pincher for cutting cable binders, new cable binders for re-assembly.
Just remove the 4 screws to be able to access the headlight's 'backstage'. Two are on top left and right of the screen, another two are below fixing the thing on the fork. Easy to find.
Now you can flap the whole thing forward, it cannot fall down because it is held by the wiring. There is a plastic cover underneath the screen which you can also remove for better view and access, it's not screwed on.
Good opportunity to clean everything there, if you are a neat freak like me

The whole cabling of the headlights is bundled in a bunch and covered with a fabric cable mantle, fixed with cable straps. Cut them carefully, but no brain surgeon skills necessary.
Now you can see that there is what looks like 1000 meter of cabling and lots of connectors.
Behind this there are the two LED drivers visible (just in case you are asking yourself at what you are looking). Each has two double wires going in and two going out, so there a 8 connectors just around these.
I suggest to start with the connectors nearest to the power supply coming from the bike. Unplug and look inside, check for discoloring, dirt etc. Maybe blowing out with a bit of canned pressurised air would be helping or using a soft brush. Check the wiring if it's pinched or chafed somewhere.
Because the complete light unit fails in your case, I suspect a fault in the power supply part. If a specific connector or wire leading to one LED driver or from there to a lamp would be the culprit, the bike would just shut down this specific function as it was in my case (see my earlier post).
Re-assembly is also quite easy, just bundle everything a neatly as possible using cable binders and cover it again with the fabric cable mantle using a few more. No need for being stingy with them.
I hope this helps. Good luck!