Is it loose, or the connection just not good? Desktop or laptop?
First thing I'd tell him or her to try is spraying compressed air all through it. If he can open it up also spraying inside. If it's loose then it'll need to be replaced.
HP NB. Battery fully charged but would go dark when plugged in and you tried to do anything. I moved the power cable to the other USB-C port and it worked perfectly normal so told her to use that port for now.