Check for physical damage (frayed cables, debris blocking the magnet).
Test with a different power source (use a 20W USB-C adapter as recommended).
Try the charger on another compatible device to rule out a faulty charger.
Restart your iPhone or update iOS if it has some power.
If troubleshooting fails, consider a new charger. Options like the Snap Battery Pack (MagSafe-compatible) offer portability and reliable charging on the go.
In short: Use a wired charger to revive a dead iPhone first, then switch to MagSafe once it has power.