The key to good soldered joints is cleanliness, both the iron tip and the wires/terminals you are soldering.
The iron tip needs to be kept clean, typically by wiping the tip on a slightly damp sponge. Most iron stands include a sponge. Use multicore solder, this has the flux built-in. Once the iron has heated up clean the tip with fine emery paper, and tin the tip with a small touch of solder. Wipe the tip on the sponge.
Never carry molten solder on the tip of the iron, use the iron to heat the wire/connector and apply the solder to the joint. Remove a short length of the wire insulation, if it’s multi strand, twist and tin the end before assembling the joint.
The size of the iron depends on the size of the items you are soldering. Bigger connectors and wires will need a bigger iron.
Remember keep everything clean!!! A fibre-glass pencil works great for doing that.
It could be that the problem with the socket are the plated through holes in the PCB. The socket gets regular plugs/unplugs and that’ll move the socket and could break one or more of connections to the PCB. The connections to the socket are potentially on inner layers of the PCB, that might be tough to fix.
Bulk assembly of PCB’s is fully automated these days, the components are machine fitted and the whole board is then flow soldered.
The damp sponge will wipe away any burnt on resin from the bit. If you use thinner solder, say 0.8mm, you’ll need to use a smaller iron bit.