I could go into detail about how these are formed, but I am fucking lazy and it is late. So I will direct you to this link which gives a basic explanation of how a contrail is formed. https://science-edu.larc.nasa.gov/contrail-edu/science.php
Simply put, a contrail is the condensation of moisture around a particulate. A particulate is any kind of very small solid matter floating around in the air. The engines also have particulate matter in the exhaust. Ever get residue on you when working on a muffler? It's the same concept with a jet engine. Water vapor is also a by product of the combustion of the jet fuel. So if atmospheric conditions are right, i.e enough particulate matter, enough water vapor or other by product vapor, then you get a contrail. The atmospheric humidity plays a big role in this as well. New jet engines burn pretty clean. When I was a kid I saw far more contrail than I do now.
Clouds form in the exact same manner. Water vapor condenses on particles in the air and poof you have a cloud. So, you noticed that the contrails were forming in the exact same area as the clouds. That indicates that the atmospheric condition were correct for the formation of clouds, and naturally contrails as well. It doesn't matter which happened first. Sometimes when the sir is dry all you will see is a contrail with no clouds. The type of clouds I saw in your video are cirrus. Very high clouds formed of ice crystals. This type of cloud often proceeds a frontal system and in general indicates rain is on the way. Check your forecast.
As I said, I could go into way more detail, but this is enough I think, I'm lazy.