Every USB-C charge problem is one of three things, and the order they should be checked in goes from free to expensive.
Lint first. A pocket lint plug is compressed into the bottom of the port, invisible without a light, and it stops the contacts from seating. A wooden toothpick, plastic, never metal, and a light. This is the fix in a large fraction of phones that will not charge.
Wear second. The port's center tongue is thin and the contacts are plated, and a worn port grips loosely. A cable that falls out under its own weight, or that charges only while held, is wear, and the connector was never designed for unlimited plug cycles.
Solder third. A port that charges at an angle, or works only when pressed, has cracked its surface mount pads. This is a real repair, and the port is a cheap part, and the work is a hot air job with plenty of flux and a low melting point solder to help.
Then there is the cable and the charger, which is where you start, but this thread assumes those are known good. Confirm with a different cable and a different brick before opening anything.
What device, and did the port wobble? Post it, and if you can, a photo of the port with a light on it, because a plug of lint looks exactly like an empty port.