Chosen Solution

I did a screen repair on an iPhone 7 Plus and whenever I connect the front camera flex the phone just stays on the Apple logo but once I unplug it the phone turns on just fine never had this problem with any other iPhone before

Most likely the front camera cable got damaged during removal from the old screen. You will need to try another replacement front camera assembly and make sure you buy from a reputable supplier such as iFixit, Mobile Defenders, Mobilesentrix or Injured Gadgets.