Is he loosing intrest

I feel like my boyfriend is loosing intrest in me. I feel like it’s me all the time that wants sex and he doesn’t. Last night we tried and he couldn’t get it up then today i tried and he said no I don’t think I could get it up .... makes me think why not is it me ? What can I do?