It was an embarrassing situation but the we have to deal with it very carefully. When we noticed him visiting porn sites we controlled our emotions and accepted his curiosity, instead of reacting impulsively we approached calmly. We decided to talk and made him comfortable to discuss with us about sex. Instead of pornographic sex we educated him about real sex and the reason for it that the intimacy should be beyond the body parts and it's all about passion and compassion towards a partner.
We encouraged him to ask doubts and questions about his curiosity and all his questions were answered playfully making him extremely comfortable to any kind of questions. Finally when he was convinced we did not commanded him to stop watching porn, instead we explained him about all the negative effects of consuming porn that how it affects our mental and physical health and makes us insensitive in bed. It also makes us objectify other genders and lose respect.
We also advised him to reduce screen time and use internet for a productive and good cause. This also made him spend more of his time in outdoor physical games and gardening and made him very productive and open minded.