How to secure jumper wire connections
Using a prototyping daughterboard†, you use screw connectors to hold jump-wires firmly in place. The daughterboard† itself won't fall off easily because it has a large number of pins in the arduino header sockets.



There are many designs, pick one that suits your project best.



Using an ordinary prototyping daughterboard† you can solder wires on the shield, later you can remove the daughterboard† and re-use the Arduino for another project without needing to remove any solder.



If you are using something other than an Arduino you can almost certainly either buy something similar or make one for yourself.



†"shield" / "wing" / "cape" are cute ecosystem-specific names for what is generically called a daughterboard.