You've done nothing that would cause pregnancy. No sperm has entered your vagina to be able to fertilize an egg.
Masturbating doesn't affect periods. Many other things can, like stress, illness, change in exercise or diet, etc.
Two days isn't really cause for concern. If you miss this month, and then are late next month, then you should see your doctor. It's common for women, even those who've been regular their whole lives.
If you get any pain, discharge with an odor, a fever, etc., call your doctor, but for now, I wouldn't worry.