Thank you for asking. I can understand your concern. It could be an indication that you are facing difficulties with getting aroused during sex. A possible problem of pornography use. Beacuse pornography use creates dependency for obtaining stimulation on it. While masturbating because one very often tends to you pornography, there is no difficulty in erection, but while sex Beacuse there is no porn, one faces issues with erections.
Next Steps
Kindly consult with a sexologist for further management and detailed instructions.