I had the same problem with a squirrel. I cant tell if this is the same connector you need or not. this replacement from amazon is the easiest route to go.
headlight plug.
Also this might be the pin. outrageous price but if you need it.....
pin
So, this has been quite the adventure. I went to my local Toyota dealership to get some answers. They said for the plugs, they do sell a replacement pigtail. Each wire is around $16 and I need three of them. 🙄 I got the part number and said thanks, but no thanks. They said the part number for all three wires that I need are 82998-12550. The problem is that the terminal on two of the wires are different from the terminal of the third wire (that comes from a different plug). I might go back and get the right part number for the third wire because clearly they got that wrong. I can buy 12550 on eBay for about $10. Still expensive, but better than the dealership. I just would need to verify the correct part numbers because clearly I didn’t get them the first time.
Then I started studying the pins. I looked at them with a jewelers loop. After doing A LOT of googling, I know that one terminal is manufactured by sumitomo and the other is by Yazaki. Their logo is stamped in the metal of the terminal. It’s very tiny, hence the jewelers loop.
Now the problem I’m having is trying to figure out the part number of the terminal. I know the company, which is good, but I’m paging through pages and pages of pictures trying to find a match, but I can’t find it.