If the socket is "loose" maybe a quick touch with a soldering pen on the key spots
Does this charger have the "smart wire" dead center in the charging cord? My HP had an issue where it got bent enough to stop full insertion of the charger - laptop would only charge if powered Off. I took a small "stirring" straw & straightened the wire & fixed it
However if the charging circuit has a fail chip .... no hope, if it is part of the MB ... unless you want to gamble on eBay
Worth a shot 50/50 chance it works:
How to Charge Your Laptop With USB-C: Your Questions Answered