Painful sex

Recently me and my boyfriend were having sex when it started to really hurt ever since then when ever we try and have sex I go really dry and it doesn’t go in without it hurting. Is it I’m just scared that it is going to hurt so I don’t want to have sex or is it something different? Also if anyone has any advice on how to make it hurt less I would much appreciate it. Thank you.