It looks to me as if your charger port/ your charger cord is loose as it may get frequent disconnections. Try and check if your charging port is allright and has no signs of physical damage to it! You should also try using your laptop with a different charger.
Thanks for the question!