Chosen Solution
after installing a new m.2 SSD the batter no longer work I am able to boot when plugged in but am I unplug it will middle shut down
Make sure your laptop is turned off. Reset your battery on the bottom of the laptop in a tiny pinhole (not the screw holes) with something small enough like a SIM card eject tool, if you can’t find it, it might be hidden behind a sticker. I had the same problem when upgrading my RAM, tech guy was kind enough to tell the solution.