Why do I no longer get an erection on watching porn or while having sex?

I do not get an erection on watching porn or while having sex. What should I do?