power lack socket loose on motherboard will cause loss of power and loss of battery charging.
Its is repairable (a common problem) not cheap as requires laptop strip repair and rebuild which is time consumming its the labour costs.
A jack socket is cheap if you can DIY, I have done this repair on my Toshiba. Satellite laptop Plenty of places to show how done and buy a DC jack socket on the web
Make and model of laptop?