Sometimes you must wait 15 minutes or longer to allow the battery to charge enough so that the laptop can be powered on. It is best to not let the battery reach 0% charge in the first place...every battery is unique....some may be Ok with being at 0% charge for several minutes while others may develop some problems. The longer the Lithium battery is at 0% charge, the more likely the battery will be damaged or have problems charging & powering on the laptop.
With the M-series laptops, if the battery is not working, then the laptop will not power on unlike older Intel Macs where some of them could power on without a battery (and sometimes even boot although some may have performance issues without a battery).
If the Magsafe charging cable is not working, then you can try using a USB-C charging cable instead. If using the Magsafe charging cable, what color is the charging LED on it & is it steady or blinking?
FYI, Do NOT disconnect the power adapter until the battery is charged to at least 10% or you can permanently damage the battery. So it is best to let the battery charge for at least 30 minutes or more (longer is safer) before disconnecting the power adapter & trying a different cable.
Here is an Apple article with some charging troubleshooting tips (many similar items, but a few specific differences between the two types of charging):
If your MagSafe cable or power adapter isn't working - Apple Support
If your USB-C power adapter isn't charging your Mac laptop - Apple Support