I've definitely had this happen with my own laptop - that sudden shutdown thing is super frustrating. The fact that it's doing it even with a different charger is a pretty good sign the issue is the battery, not the power adapter. When chargers fail, usually the laptop either won't charge at all or charges really slowly. If two different chargers both work (as in, the laptop recognizes power is connected) but you're still getting those random shutdowns, your battery's probably giving up.
Here's how to confirm: run a battery report. On Windows, open Command Prompt as admin and type `powercfg /batteryreport` - this generates an HTML file showing your battery's design capacity versus current capacity. If the current capacity is way down (like 60-70% or lower of the design capacity), it's definitely the battery. Dell batteries usually degrade to about half capacity after 2-3 years of regular use, and sudden shutdowns happen because the battery can't sustain the power draw at certain battery percentages even though it claims 20% remaining. The battery's internal circuitry gets wonky over time.
You can also try booting into BIOS and checking the battery health status there - most laptops show it. But honestly, if it's shutting down at reported 20% battery across multiple chargers, you're probably looking at a battery replacement. They're usually pretty affordable for Dell laptops, maybe $40-80 depending on the model, and it's a straightforward swap.