Short answer. An eBike battery that will not charge usually has one of three problems: a bad charger, a bad charging port on the battery, or a BMS that has locked out to protect a failing cell. Test the charger with a multimeter first.
Step by step
Test the charger output. A working charger reads slightly above the battery's nominal voltage at the plug (about 42V for a 36V system, 54.6V for a 48V system). Zero volts means the charger is dead.
Inspect the charging port. Look inside the port on the battery for bent pins, corrosion, or debris. Coastal riders see corroded ports constantly.
Try a different outlet. GFCI outlets can trip and reset silently. Try a known good outlet in your kitchen or garage.
Let the battery warm up. Batteries below 40 degrees F often refuse to charge. Bring the pack inside for two hours and try again.
Get a load test if none of the above. If the charger is good and the port is clean, the BMS or the cells are the issue. This needs a proper load test to confirm.