I want to replace one half of this with longer wire, but I am not confident about the name of the connector used.
Image of JST-XH included to convey size. Ruler is metric.
Why not just splice the wire?
micro jst 1.25 ?
https://www.jst.com/products/category/wire-to-wire/
Probably good to check these out, maybe the XA series?
That was one of the two I found in my search. The other was Molex PicoBlade. None of the pictures I saw of gave me confidence either way.
A 2-pin connector?
Molex 51021 or similar. Could you measure the pin pitch?
Your 2nd best bet would be to get the pin spacing, and filter your search using that.
Your first best bet would be to just replace both ends.
I settled on a ‘standard’ and just bought a massive kit of each of those connector types- wire-wire, wire-board, wire-panel in M and F, in various pole counts. Buy once, cry once.