does it affect periods?

I rub myself but I never penetrated or anything, and idk why, I always think that it's the reason why I have late periods (goes up to 6 months) , so is it connected or is there another reason?