Charging problems have several causes
Packed lint can keep a cable from seating correctly. A worn cable or power adapter can imitate a port problem. Battery faults, liquid exposure and board-level issues may also stop charging. That is why a useful diagnosis comes before replacing parts.
What to try safely
Try a known-good cable and adapter and check whether wireless charging works on supported models. Avoid pushing metal objects into the port, forcing a cable or repeatedly moving it at an angle. Those actions can damage contacts or make an existing problem worse.
What to tell us
Send your iPhone model, whether the cable clicks into place, whether charging cuts in and out, and whether the phone connects to a computer. Those details help narrow down the likely repair and prepare an estimate.