Erectile problems from a recent injury or truama

Patient: Please help.I’m a 17 year old male and I recently started to have sex about a month ago. 3 days ago I was trying new positions with my girlfriend, and I somehow managed to land her on me in a way that made my penis have a snapping feel. no pain, but just felt like a knuckle crack, except at the base of my penis. After that my penis went limp, and I could not get it erect for the rest of the night. The next morning however, we tried, and everything was fine, however, tonight we tried to have sex but the same problem happened. There is still no pain and this has never happened before. I was wondering if erectile problems can occur from a recent injury or truama, or is it something more serious and long term.