I'm kind of curious if the smaller light housings inside are sealed up. If so, just remove the broken plastic bits. lol
They do appear sealed but theses aren't your grampa's headlights . I was amazed how much was going on inside this $1400-1500 housing when I replaced mine. The wiring harness is huge with multiple plugs and more wires than a headlight deserves, multiple electronic modules attached with huge heat sinks, multiple plastic housing connecting to each other, etc. The days of replacing a $10 square headlight are over....remember when they had 4 (!) separate headlights!
In remembrance of my carnage.... this was an ouch for sure as the truck was brand new.....
This is only one set of wires............there's more.........