Pain during penetration and ejaculation when not so hard

Hi, I have this issue for many years but I had a very bad relationship when I was a virgin and it didn’t go well but stayed in the relationship for a very long time due to shame/societal reasons. But I was not able to have penetrative sex because of bad abusive partner. I had performance anxiety due to it and have still not gotten over it. I have had penetrative sex a few times but I felt some light pain in my foreskin when the girl was on top of me. I have avoided penetration as much and just let the girl suck me or masterbate me. Last week I had an opportunity and I couldn’t get hard at all, but recently when I masterbated, I get hard but it’s not getting as hard as I like but I ejaculate. So I have two problems, first is pain during penetration or even sucking due to some skin and second not able to get too hard while ejaculating. I don’t know if anyone has had this problem. I’m in my middle age and trying to find solutions to this. When I took a pill I got hard but I don’t want to rely on it but penetrative sex gives me performance anxiety and I have lost confidence due to it. My testosterone level is high 580 and I don’t have any penis problems when I checked. I have masterbated many times upside down rubbing my penis, not sure if that is a problem. Would hear thoughts from others on whether you faced similar problems and is this a mental or psychological issue? I’m still working through Mojo but thought I should post to learn from others with similar issues if any. Thanks!