Everything has been going well with my MBA M1 until today. I do not keep it plugged in. Instead, I run the battery down to 10-15% and plug it in. Today, I plugged it in when it alerted me of lower power at 10% and it displayed the charging icon. About 30 minutes later it shutoff briefly and restarted. The battery reported a 1% charge. I don't know if my approach to leaving it unplugged and only charging when necessary caused this issue or not. I keep the Optimized Battery Charging option checked and wasn't doing anything taxing beyond a browser and Office apps. Hope it was a fluke.