Boyfriend gets soft when we have sex

We have a great relationship and have sex often but occasionally he gets soft in the middle of sex. I was super understanding and even tried new things with him but now it’s becoming more frequent. He was brought to tears last night thinking that he might have erectile dysfunction. But he is only 22. He says it’s not me or us. I am just wondering if anyone has gone through the same thing with their significant other? What did you do to spice things up?