Hello,
If you were having regular erections earlier, what you are facing now is sex related anxiety. This usually happens in initial stages and the problem will disappear over a time. This seems to be absolutely natural. If your morning erections are good then the cause is psychological. Mean while you should take protein diet, regular exercise, remain stress free, and remove sex related anxiety. Stop watching porn and do not indulge in excessive masturbation.
I hope it helps. Take care and regards.