The material silk is made from allows it to gain electrons easier, much easier than glass. So when you rub the two together, electrons jump from the glass rod to the silk, giving silk a net negative charge and leaving the glass rod positively charged.
Now, lets also say the silk has 5 electrons and 5 protons in its atoms. These 5 positive also cancel with the negative, making the total charge 0, just like in the glass rod.
When you rub the two together, the electrons move from the glass to the silk. So let say 2 electrons left the glass and moved to the silk. The glass now has 10 protons and 8 negative charge = 2 positive ones. The silk experiences the opposite effect, since it gains electrons.
Hope It Helps
Mark As Brainliest !!