Trying to conceive!

Is it possible to become pregnant if I️ had sex a few days before my period? Me and my boyfriend are planning to have a baby but I️ feel like it’s best to try when I’m more fertile during the ovulation stage.