I go into this a little bit deeper in my other pinned thread (
https://forum.pedalpcb.com/threads/pitfalls-and-tips-designing-effects-pcbs.28072/), but tl;dr you can buy the cables from AliExpress/etc pre-made - that post has links to the cables I buy. I get the cables pre-made in 100mm (I/O board to footswitch board) and 50mm (footswitch board to effects board) sizes. Agreed that you want to have a ribbon cable in between - they make board-to-board connectors but I haven't used those so wouldn't have a good recommendation.
For the JLC side, you can order the connectors already soldered. The part number magic prefix is:
<orientation><pins>B-<connector type>
where
orientation B = upright and S = 90 degreee
and
connector type PH = 2mm pitch, XH = 2.5mm pitch. (So XH will fit standard 0.1 pin spacing - so you can substitute plan pin headers if you want)
so putting that together,
S4B-XH-(extra stuff) = XH connector, 4 pins, right angle
B3B-PH-(extra stuff) = PH connector, 3 pins, upright
The (extra stuff) encodes some other stuff, like color, how long the part is, and whether or not the pins are slightly crimped to make them easier to solder, but I mostly don't care. I generally buy the cheapest ones that are knock-off JST, they're like $0.03 USD/ea in qty 100.
You can also make your own cables of course -- you crimp them and not solder them, but the whole point is to save time IMO so crimping is for suckers. You can also buy pre-crimped blanks that snap into the housings (l
ike these) so you can make cables that have the color coding you want, but I could never find them in 50mm size so I just gave up on color coding the wires. And yeah, you can solder one end but soldering wires to things also sucks.
What works best for me is right angle connectors on the IO board (audio jacks, DC) that go 4-pins (straight through cable) to a right angle connector on the footswitch board (IN, 9V, GND, OUT), and then from the footswitch board I have 2 3-pin right angle connectors (IN, 9V, misc), (SW, GND, OUT) that go to 2 3-pin upright headers on the PCB (crossover cable). "misc" I can use for 18V or something if I put a charge pump on the footswitch board, or sometimes I use it for a LFO heartbeat signal.