It almost certainly didn’t.
It’s unlikely killing insects would affect someone’s soul. Typically, killing spiders is treated very different than killing humans. Slughorn explains that it’s caused by murder specifically, not just killing.
“Well,’ said Slughorn uncomfortably, ‘you must understand that the soul is supposed to remain intact and whole. Splitting it is an act of violation, it is against nature.’
‘But how do you do it?’
‘By an act of evil – the supreme act of evil. By committing murder. Killing rips the soul apart. The wizard intent upon creating a Horcrux would use the damage to his advantage: he would encase the torn portion –”
- Harry Potter and the Half-Blood Prince, Chapter 23 (Horcruxes)
The act that splits the soul is murder, and while the “magic” definition might be different from the legal definition, killing spiders is probably still not considered murder. Splitting the soul is clearly shown as a rare act of extreme evil. It’s unlikely that killing spiders (something many wizards likely do) would be enough to cause such a thing “against nature”. In addition, if killing spiders would be enough to create Horcruxes, more people might be likely to be willing to do it.
Later, Slughorn also says it’s bad enough to think of killing one person, implying it is human death (or at least the death of something humanoid) required to create a Horcrux.
“Merlin’s beard, Tom!’ yelped Slughorn. ‘Seven! Isn’t it bad enough to think of killing one person? And in any case … bad enough to divide the soul … but to rip it into seven pieces …”
- Harry Potter and the Half-Blood Prince, Chapter 23 (Horcruxes)
Slughorn also would likely not feel so strongly about Horcruxes if he thought they could be made by killing spiders, since the majority of people don’t have much moral qualms about killing spiders.