I will give you the biggest "secret" I have learned about soldering with any iron intended for electronic use.
It may be true that you should first establish a good, clean mechanical joint, apply flux, heat the joint, and then apply the correct amount of solder, but that does not explain HOW those four steps are accomplished. That came from people who were using blow torches and were assembling parts that weighed tens and hundreds of pounds. Here's how it really works in electronic work:
1. Yes a good, CLEAN mechanical joint. But today that can be an almost microscopic pad on the PCB which matches an equally small one on the part. And hobbyists often use parts that have been sitting around, oxidizing for 5 or 10 years or more so they will require some cleaning.
2. Yes, apply some flux. But it takes a very small amount. Most internet videos show about 10X to 100X too much. Flooding with flux is no substitute for failure to clean in step #1.
3. Step 3, heat the joint before applying the solder. Yea! Good luck with that one. You can place a clean soldering iron on a joint for a half hour and still not heat it. You MUST have a small drop of liquid solder on the tip of the iron. When that small drop touches the flux covered surface it will activate that flux, then start to adhere to the now cleaned surface and efficiently and quickly transfer heat to the entire joint. And that is the trick, the secret that NO ONE teaches.
4. Then, about a second or two after that initial drop of solder starts to transfer heat to the joint, you add the full amount of solder needed to establish the joint.
An advanced technique is to place the needed solder along with the flux in step #2. This is what is done with a soldering paste on surface mount boards. But then, quite often the heat is not applied with a soldering iron.