Assuming you mean a swarmkeeper ranger, no. Also, there would be no point, since at no time is your swarm anywhere other than your own space, so if the swarm could cast touch spells for you, you're in touch range.
I think the OP may be thinking of the next feature on the subclass's list where the PC can use the swarm as mage hand. I'd say RAW action economy of Mage Hand precludes spell casting through Mage Hand, but your DM generosity may vary. I'm trying to think of a passive damage spell like Armor of Agathys, but that requires someone to attack the PC and I don't believe the swarm can be attacked (like Mage Hand) separate from the PC because of the aforementioned union of swarm and PC outside the Swarmkeeper Magic trait ... and having said that, it looks like the Swarmkeeper Magic RAW does provide the limit of using the swarm for effect beyond the PC's person with the swarmkeeper spell list.
If you'd want to allow it, I'd say at minimum feat it, call it Swarm Touch or whatever, turning touch into ranged ability is a sorta big deal and shouldn't be unlocked by what's mechanically the acquisition of a cantrip.
Could I use a touch spell through my swarm like how you can through your familiar from the find familiar spell ?
This should be asked in the correct class section of the forums.
But if it does not say you can, like it does for Find Familiar. Then RAW, no. But ask your DM, they might let you.
I think the OP may be thinking of the next feature on the subclass's list where the PC can use the swarm as mage hand. I'd say RAW action economy of Mage Hand precludes spell casting through Mage Hand, but your DM generosity may vary. I'm trying to think of a passive damage spell like Armor of Agathys, but that requires someone to attack the PC and I don't believe the swarm can be attacked (like Mage Hand) separate from the PC because of the aforementioned union of swarm and PC outside the Swarmkeeper Magic trait ... and having said that, it looks like the Swarmkeeper Magic RAW does provide the limit of using the swarm for effect beyond the PC's person with the swarmkeeper spell list.
If you'd want to allow it, I'd say at minimum feat it, call it Swarm Touch or whatever, turning touch into ranged ability is a sorta big deal and shouldn't be unlocked by what's mechanically the acquisition of a cantrip.
Jander Sunstar is the thinking person's Drizzt, fight me.