Sorry if this is silly..can I masturbate?

I’m 8w2d and I masturbated, clitoral stimulation but I felt my uterus cramped up but all is fine right after. Is it okay I did that?