Chosen Solution

When I try to take a picture with the selfie camera it just shows a black screen. The front camera and everything else on the phone work properly. I just recently replaced the charging part on the phone.

While replacing the Lightning Port, you probably damaged the FCAM & Sensor Flex (FCAM = Selfie). Take a look at this guide to retrace your steps and see if the flex cable is torn. Even a tiny tear can cause issues. Here is a detailed guide on the FCAM/sensor flex.