Codeine?

A doctor recommended that I take codeine with paracetamol for my braxton hicks but literally everywhere I read online says that it’s not recommended in pregnancy so I’m confused because even the NHS website suggests not taking it when pregnant which is a reliable website that I trust and all the midwives and doctors recommend so idk