Chosen Solution

I replaced the lightning connector assembly, which includes the headphone jack, and now the phone doesn’t recognize headphones being plugged into the jack. Audio continues to play through the speaker when plugged into headphones. What did I screw up when replacing the assembly?

I would try a reconnection for the Lightning Connector a few times. If that doesn’t work after about 4 tries, its most likely a bad part. I would contact the place where you bought it and get an exchange