Sex after having a baby

I just had a baby and I’m scared to have sex once I’m cleared by my doctor. I did have stitches.

Was it painful?