Actually, it doesn't.
Insulin resistance starts long before the weight gain.
This was shown in 1000s of examples over decades of testing by Kraft (there is a great you tube video on the subject called 'Kraft, father of the insulin assay' if you want the details. Well worth the watch).
In addition, people with PCOS and any other type of insulin resistance increasing medical condition (like myself) or meds which increase IR, became insulin resistant before the weight gain, which is a symptom, not a cause.
Of course, as soon as the weight increase becomes significant enough, then the weight itself becomes a factor too.
But the thing that came first was the IR