There’s a few ways to go about it. The best, imo, is to twist the wires you’re going to use together at one end, then tin that end (cover in solder, just not too much). Tin the pin you’re going to connect it to, and then solder them together. The wires won’t fall away from each other when the solder loses it’s cohesion this way, because they’re all one at the end.
Another way to go about it is to use a “third hand” or “helping hand”, great tool for soldering, and will allow you to position wires where you want to go while keeping everything very still. This way all you have to do is worry about your soldering iron and the solder, instead of constant re-positioning.
While it mostly just details tips for PCB work, not so much loose wires, this guide by Adafruit is great for beginners or just a refresh on the basics of good solder practice for more familiar makers!