Sex , 4 months pp

I tried having sex 3 months pp didn’t turn out good . Hurt like hell and didn’t let him go in . Anybody else going through the same thing ? Is it true the longer you wait the more you’ll be comfortable like not feeling sore ?