Fuses generally are supposed to protect from (current) overload of the component.
An (apparent) overload could appear through a short circuit in your wiring.
Do you have a multi-meter handy? Measure the resistance between the 'plus' cables arriving at the headlamp (red-black, red-yellow) and the ground (i.e. either the frame or the black-yellow cable). If this is closer to zero than infinity, you might have a wiring issue.
For reference, the
wiring schema might come handy.
While you have the multi meter in hand, check the resistance of the lamp. It should be non-zero and non-infinity.