Find out which part has failed before buying anything.
1. Check the adapter light. If it is off or flickers, the adapter or its cable is likely faulty.
2. Measure the adapter's output with a multimeter. It should match the voltage on its label (often 19 or 20V).
3. Wiggle the plug in the laptop. If charging comes and goes, the DC jack or its cable inside is loose.
4. Try a known good adapter of the right type.
5. If the laptop runs on the adapter but the battery stays at 0%, the battery is likely worn out.
6. On USB-C laptops, try another USB-C port and a charger with enough watts (often 45W or more).
If a good adapter and battery still don't work, the charging circuit on the board needs a technician.