Short answer. An eBike charger that will not work is usually a blown internal fuse, a bad output cable, or a dead power supply. Test at the plug with a multimeter. If the charger reads zero volts on the output, it is dead.
Step by step
Try a different outlet. GFCI outlets trip silently. Test in a known good outlet before assuming the charger is dead.
Test the output voltage. A multimeter on the barrel or XLR plug should read slightly above battery nominal voltage. Zero means the charger has failed.
Inspect the cable. Wiggle the cable while measuring. Intermittent voltage means a broken internal wire, usually at the plug or the strain relief.
Replace, do not repair. Cheap knockoff replacement chargers cause battery damage. Buy a name brand or OEM replacement rated for your battery voltage and amperage.