Thank you for your question. Pain associated with intercourse, or dyspareunia, is not something to take lightly, especially if it is a new development. The cause could vary from a simple infection of the vaginal canal or the cervix to something more complex like metaplasia or uterine polyps.
I think you should visit your gynaecologist for a pap smear and a pelvic ultrasound.
Many thanks and warm regards