There are quite a few reasons sex might be a bit different after childbirth. Please know you are not alone and there are ways to make it better.
Body image
Fatigue
Discomfort
Hormones
Depression
Relationship (with partner)
All of these play a role with your libido too.
Why might there be pain: hormonal changes and low estrogen leading to dryness, discomfort in the area of tear (if one occurred in delivery), low testosterone with breastfeeding.
Working with a pelvic floor PT along with sex therapist or sex counselor and your Ob/gyn are a great start. We also have many colleagues (PAs and Nurse practitioners) who dedicate their time to sexual health!