Relationship at risk

Past twice I’ve went to have sex with my girlfriend first time it was fine for 5/10 mins then it went down before I could finish, then last night we were fine kissing etc got hard went to have sex and it went down, now she is worried I’m not attracted to her anymore which i definitely still am, but makes me worried aswell that we could end which makes the situation so much worse and more pressure for it not to happen again but increases chance of it happening, this happened to anyone else?