How long does the egg live?
After ovulation, the egg lives for about 12-24 hours. Fertilization can take place only during this time period, but the sperm needs at least 9-12 hours inside the woman's body to get ready.
When should you have sex if you want to get pregnant?
Your chances of getting pregnant increase if you have sex regularly, more often, and as you get closer to the day of ovulation. Your fertility also increases the more often (but no more than once a day) you have sex throughout the cycle, not just during the fertile days. Your chance of getting pregnant is nearly zero if you have sex after ovulation. Why? Sperm need about 12 hours of "prep time" in your uterus before they can fertilize the egg. And the egg usually doesn't survive long, maybe only 12-24 hours, for that to happen.
So to get pregnant it's best to have sperm already close to the egg when ovulation happens. That's why when you want to get pregnant the best time to have sex are the 1-2 days before and the day of ovulation. Not the day after.