If a lightning connector won’t provide a charge or needs to be wiggled carefully to provide a charge, power off the device, then try using precision tweezers to scrape the innermost wall of the lightning jack in a pinching motion to check for lint buildup. Pocket lint or other debris can accumulate inside the jack, compacting each time a cable is inserted. This can prevent a lightning cable from seating fully. Clearing the lint may restore functionality without replacing the part.
Check the color of the silicone gasket surrounding the USB type-C charging port. If the color of the gasket on the new part doesn’t match, swap the gasket from the old to the new. The gasket can accidentally be installed upside down, so check the pictures for correct orientation. There are spring-like contacts on the underside of this board, so when the replacement board is installed, it will tend to lift itself up as though it is not seated correctly. Once the retaining screw is reinstalled, the apparent problem goes away.