I didn't wear gloves when masturbating (fingers inside vagina.) will this cause infection?

No. People don't use gloves normally to masturbate. There is no harm or shame in touching your own body. You can't give yourself an std. Just wash your hands and explore however you like.