Hi Secrets! Well firstly good job on your first ruin, I’m proud of you too!
It sounds like your vaginal muscles just spasmed hard, which is what they do because they expect to be wrapped around a cock at that point (and they just want to squeeze every last drop of cum out of it). As long as it went away immediately I wouldn’t worry about it happening that one time. If it keeps on though, you know what I’m going to say, only a doctor can really give you a good answer.
I would suggest you try doing it with a dildo in though, give your pussy something to clench on, see how that changes it. Also for really bad ruins you want to stop rubbing AND pull a dildo out at the same time. And for some fucked up reason you’ll want them to be worse, it’s so good.