The good news is it’s not the SAM that is blowing it.
That does look a bit messy. If it were me, I would try to get another holder, then at least you know the connections inside the holder are good.
Regarding the melted wires, I would cut them back to where they are good, then solder a fresh wire between the cut end you made to the track (if that is possible- might be aluminium).
TBH , it might be worth getting a replacement holder and showing what you have to a good auto electrician and seeing if they can sort it.
Also change the bulbs - they are starting to look black.
And check the other side to see if it isn’t similar.
There is no mystery to what has happened, it’s simply bad design and implementation. The wiring/connector, especially the earth can’t cope with the amount of current flowing especially if you have side/brake/indicators on - not an unusual situation if you are waiting to turn at lights at night.
Once it is sorted you shouldn’t have any more problems