A doctor is your best bet. But there are tons of details you an sort through on your own too. Research, because there are too many to list.
Blood Pressure.
How often are you relieving yourself in that manner....because I would assume rug burn is going to create some sensitivity issues. Lol
Exercise and activity levels. Energy. Blood flow too. I have only had an issue one time to speak of. I was talking to a puerto rican girl, who was awesome in the bed. I had never had any ED issues. Around midnight she texted me and I was at the gym, which was a 24 hour one at that time. She asked me to pick her up from a bar close to me and she'd spend the night. I did, and was really disappointed when I couldn't perform that night. Luckily, it wasn't the first time, and I made up for it in the morning. Got to the doctor, and he explained that supplements like preworkouts that expand the veins for bloodflow, and then the swelling that comes from heavy lifting, can sometimes stop a man from reaching erection. I was shocked, but it made sense.
Stress and getting our of your own head is also relevant here.