This is a pretty classic failure mode.
The main fuse typically runs at 2/3 of its load rating. Which naturally warms the fuse. It melts from within, when the current gets too high.
It can also melt from external heat applied to it.
The fuse clips develop an oxidation layer (when exposed to the atmosphere) which is resistive. Passing current through this resistance generates heat.
The heat of a normal fuse AND the heat from the resistive coating can melt the fuse. The symptom of this problem it that the fuse melts near the end cap.
The problem is exacerbated by higher electrical load, like higher wattage headlights, coils, etc.
Frustrated with the constant fuse"blowing", POs put in larger fuses, or bolts in place of the fuse.
Heating becomes so high as to reach the melting point of the plastic housing and even change the temper of the spring clips, so they don't "grab" the fuse as tightly. And, the lower contact pressure diminishes contact area that also creates higher resistance.
When the melted plastic cools down, the clip terminals are no longer free to self align with the fuse end. A replacement fuse then gets less that half the contact area at the clip, and more heating ensues. I've even seen abuse so bad the the solder on the terminals melts, too.
It all a spiral that results in the pictures you've posted. And it all started with dirty or oxidized fuse clip contacts. It looks like yours was also damaged by overheating the terminals during soldering operations.
I'd assess yours is beyond hope of salvage, I'm afraid.
If you can't find a new one. Then only accept a used one that has no signs of melted plastic. And, one where the fuse clips can be polished bright and shiny. And, that the clips offer fuse retention to a point where a tool is required for removal. No popping the fuse out with bare fingers. This latter indicates poor clip to fuse contact pressure.
If you have added more electrical load, consider going to a fuse that isn't operating so close to its parting point commensurate with the load you've added. If you added 5 amps to your lighting and electricals, then go to a 20 Amp fuse. Your battery will hate you, but, your fuse panel will survive.
You should be able to hold your thumb on that fuse without pain after the bike has been running for 5 minutes with everything on. Warm is OK. Blisters and charred flesh, aren't.
Cheers,