A part number for the supply would be helpful. It would also be helpful if you traced the board and made a schematic showing the connections to the damaged part.
Looks like it is the switching control circuit as it is on the HV side of the supply.
It may have a high-voltage MOSFET inside, or this may be separate under the PCB.
Hate to say this, but it's not worth repairing!
Just from the look of it, I think the bin is the best place for this supply. The power supply does not appear to be designed with good safety in mind. Is there any isolation slots between the primary and secondary sides for instance?
These sort off supplies are very easy to get so I think a replacement is a good idea.
And cheaper than parts to fix the old one.
there is a coil wire coating isolation weakening mechanism described in an article - where they show how the channels develop inside the laqcuer over time leading to isolation failure - it might be the primary cause here -- the "short" (over sparking) turns in primary cause core saturation - cause the current peaking (without risen voltage at secondary - so it won't get limited by any means) leading to excessive currents on mosfet - leading to overheating and failure . . .
or
the filter cap next to controller was degrading and caused the chip to fail