Lint in the charging port is the most likely culprit.
Check the charging port for lint or debris first.
Your MacBook Air’s MagSafe or USB-C port collects pocket fluff over time. If the cable goes in but doesn’t click fully or feels loose, that stuff is blocking contact. Use a toothpick (carefully) or a soft brush to clean it out. 9 times out of 10, that fixes it.
If the port is clean, try a different cable and charger. Apple’s cables die more often than people admit. Borrow a friend’s charger for 10 seconds to rule it out.
For Intel MacBook Airs, you can reset the SMC (Shift+Control+Option+Power). For M-series Airs, just plug in and force restart – hold the power button for 10 seconds. But 95% of “won’t charge” stories end with a dirty port or a dead cable.
Don’t panic. Start with the port.