Can you get pregnant if you get your period the same day you tried to get pregnant?

You cannot.

You will only be suitable to get pregnant roughly 2 days after your menstruation is finished and for the next week after that, give or take a couple of days.