Welcome to TSF! :smile:
Are you sure the AC outlet you're plugging into is actually working?
If so, now check to see of the laptop end of the charger is putting out the correct voltage with a multimeter.
If that's also working fine, then that leads us to the power input jack on the laptop. More often than not, on older laptops, they get broken loose from the motherboard and need to be repaired or replaced. Doing so can be a real pain in the you know what, but, if you want the laptop to work correctly, ya gotta have this port working.
The way to keep this from happening is every single time you remove or insert the charger cable into the laptop, you have to do so without wiggling it up, down, right and/or left. Straight in, straight out, gently.