The power cord is plugged in, but the battery isn't charging

So, I’ve run into a bit of an issue… I recently had my computer (Ryzen 7 7840U) plugged in, but noticed that it was losing power. As I was trying to troubleshoot the issue, the battery ended up dying. I’ve tried different power cables, but nothing is taking.

If I unplug the battery, the laptop will power on. However, it won’t turn on with the battery plugged in. Does anyone have any suggestions for how I might fix this issue?