Tip for working with Dupont connectors: if you have N cables connecting to a pin header next to each other, then remove them from their 1x1 plastic housings and put all cables into a single Nx1 housing (there are very cheap sets with a couple of dozen different Nx1 and Nx2 housings each). It will almost completely prevent cables disconnecting themselves from the pin header.
Feel free to modify this as needed, e.g. by having a 6x1 connector on one side splitting into 4x1 and 2x1 on the other if that’s how the cables group. Or use a …x2 connector if the pin header has two rows like here.
You will love it, believe me.