Camera and flash not working

I was given an iPhone XS in very poor condition that I wanted to restore. However, upon testing it I found that the flash doesn’t work when trying to use the flashlight, but does function in the camera app with flash turned on, and the 1x camera shows a black screen. (The 2x camera still works). Ive since taken it apart and reseated the 1x camera connector and flash connector in hopes that it was a loose connection, but that didn’t work. Being that the flash still works in camera, but not as a flashlight, could this be a software issue, or are the parts just damaged?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 1
crwdns2934285:0crwdne2934285:0