What is the name of this component? 2 pin, white connector
Looks like JST XH series (2.50 mm pitch). Picture of the model is below (from Digikey).

Mating connector for the 4-pin would be the XHP-4, plus you have to buy the contacts separately, eg. SXH-001T-P0.6 for 22-26 AWG wire.
The official crimping tool is around $500 USD but there are cheaper ways to make a crimp that's probably good enough.