I'd suggest taking it to an automotive retailer and comparing it to the bulbs hanging on the shelf
This identification chart may be of use for identifying likely candidates: https://www.lucasautomotive.com/globalassets/english/media-uploads-2020-02-21/lucas-bulb-wallchart-en.pdf
I'd start in the HB part of the shelf. Leaving the keyways off their moulding may have been to make the connector compatible across lots of bulbs, eg by not having the ) shapes it can fit any of the HB3 and HB4 derivatives.
It may also fit HIR2 and H10 given that this (unrelated) kit can plug in place of all of these bulbs so there's obviously options to play games with moldings/keyways to allow multifit for aftermarket parts
https://mytuff4x4.com.au/shop/hulk-4x4-products/lighting/led-headlight-globes/hb3-hb4-h10-hir2-electronic-canbus-kit-12v-pkt2/
It may be bipolar too and have a bridge rectifier or something inside to allow connection in either orientation or to allow for manufacturers who don't conform to standards. It is going in place of a bipolar lightglobe which will happily work no matter which pin orientation is used for polarity.
Thanks for that post. As you specifically mentioned HB3, HB4, HIR2, and H10. I specifically went to eBay and bought one of each of those to see by trial-and-error, which one fits that HID ballast. The order deliveries are not coming in all at the same time.
I first received the H10 connector, and it fit perfectly, including the snap to hold it in place.
Just today I received the HIR2 connector, and it with a pair of identical connectors (I guess they figure you would be setting up headlights on both sides of the car at the same time, so they sent 2 in a pack). This HIR2 connector visually looks completely identical to the H10 connector I received before, and fits just as easily. One of the 2 HIR2 connectors in the pack fit slightly too tight though so I was able to push it ALMOST all the way in (enough I could definitely feel it binding with the pins in the ballast connector), but not quite far for enough it to snap into place (the other HIR2 connector in the pair fit just fine, just like the H10 connector did).
Also today I received the HB3 connector which had a significantly different visual appearance. for most of the connector, though it was physically compatible with the ballast's connector. Again as I plugged it in, it fit snugly so I know it was making contact, but unfortunately it didn't fit far enough up for it to actually snap into place with the snap holding mechanism. Again this was a set of 2 connectors, but this time both of them didn't fit far enough up to actually snap into place.
The last one is one I'm still waiting to be delivered, and it's labeled on eBay as an "HB3 HB4" connector. I bought it specifically because it did mention HB4 in the title of the item listing, and I already had ordered a connector that was specifically labeled as an HB3 connector. I'm not sure which type the "HB3 HB4" connector actually is. It seems kinda like the seller used keyword spam to get people to find it, regardless of if they are searching for an HB3 connector or an HB4 connector. As I'm not an automotive technician, I'm not sure how compatible HB3 and HB4 are supposed to be.