I’m frustrated

My boyfriend told me he can’t sexually perform for over a year now and it’s frustrating him and he thought he’d loose me because of that we been dating 5-6 months and tried twice and he just couldn’t, he told me it isn’t me and that he has that problem and he’s trying to figure out I love him and want to be woth him and idk how to cope and help us have sex and be good together he said he has feeling and so do I but like do u think he’d lie and he’s not attracted to me ? He use to touch me a lot and all that but then he was being distant cause he knew I’d figure out he can’t perform and I’d just leave but I don’t want to leave him because of that how will I get him to be confident and comfortable with me and flirt and all that nice stuff I feel like it’s lowered his self esteem, he made a tinder profile cause he thought I was going to leave him and so he doesn’t start from square one when that happens and I told him that bothered me a lot and he apologized but like I love him and everybody around me tell me to move on but I care for him o want him so I’m frustrated but o also don’t know if he’s being kind about it he said he doesn’t want to end the relationship but not having sex is a dealbraker but I wasn’t planning to end the relationship because of this I am willing to help his sexual problems and come closer and be together but idk how and what to do I don’t know if he’s feeling bad to tell me to break up he seemed like he didn’t want to cause talking to me about all this I could see his eyes water up and face flush. Anyone been in this situation? Is there hope here will things get better will we ever have sex and make it work I think he loves me and I do to he said he wouldn’t waste a whole summer being with me if he didn’t like me or want to be woth me I’m just concerned that his issue may not fix but will it ? And how can I help him ? Tell him to try when he feels ready? Idk 😐 we’re both 23