Sex after birth

We tried having sex and it didn’t work. It hurts so bad. I Am 7 weeks postpartum. When does it usually be easier to have sex after birth?