If you don't know how to repair it, you can simply replace it with a new original/compatible charger. Chargers are integrated products and many power converters are power integrated. They are no longer the previous high voltage switching tube. If it is burned, the high voltage side will be completely destroyed and the safety after repair is poor.
If it is an ordinary lithium battery charger, you can buy a lithium battery charging board, which costs 0.9 yuan each and is about the size of 'a coin.
Or buy a constant current and adjustable constant voltage charging board like this one. Through the setting, you can charge any variety of rechargeable batteries (nickel metal hydride, ternary, lithium iron, Farad capacitors).