But how do you reconnect the wires to the housing socket
Sounds like you need to replace the bulb socket.
A new bulb socket comes with the wires attached so you can then splice it into the existing wiring.
Search GMC Envoy Questions
GMC Envoy Experts