The laptop runs fine on the charger, but shuts off the moment you unplug it. This is almost always a battery issue, but let's confirm.
Check the battery status:
Hover over the battery icon in Windows taskbar
Does it say 'Plugged in, not charging'?
Does it stay stuck at 0% or a specific number?
Is the battery swollen? (Touchpad might be lifted)
Wiggle the charging port gently - does it flicker?
Battery Life Logic
Batteries wear with use and time, but there is no universal replacement age. Compare reported condition, runtime, workload, and charging behavior before choosing a replacement.
Bring your questions, not just your computer. A photo, screenshot or short recording can help show us the problem. Your guide will carry over to the contact form.