Chosen Solution

I replaced my iPhone 7+ screen and when i installed the camera flex and the ear piece it keeps making a harsh static noise and the phone does not turn on when it is plugged in. So i ended up buying a new camera flex and ear piece think that, that was the issue. after installing the new parts i get the same result. Although the phone works just fine when i dont have the camera flux plugged in. Any ideas? Thanks.

you have to see that the connector pin on motherbord might be broken or short this happen when you put the flex while the phone is in on condition.Check for shorting.

Agree with Akash. If you cannot see any damage try another flex as they are very delicate and can easily get damaged installing them.