You will get discounts if you buy in volume, so a good option would be to design your boards so that they use the same connector or multiples of same connector, even if not all pins / wires are needed.
Also, it's worth focusing on commonly used connectors.
For example, 2.54mm/0.1" 2x5 headers are very common because they're used as USB 2.0 headers on motherboards and for other purposes (COM headers, audio headers etc) so they're mass produced and they're usually kept in stock in higher quantities.
So even if your board needs only 6-8 pins, use a 2x5 header and leave 2 pins unused. If your board needs 12pins or more, put 2 2x5 headers, maybe with one pin spacing between the connectors to make it easier to solder (or one header / connector on each edge of the card).
They're 10 cents a piece if you buy 100 on Digikey, and if they're 10 cents on Digikey, they're much cheapers at stores like tme.eu which important brands the big distributors don't, and probably 2-3 cents each on LCSC or other ebay places.