Bedroom issues

I'm 24 and I had sex for the first time a week ago. Until thne I used to masturbate watching porn quite regularly. Although I had sex with a person who I like immensely on multiple occasions over the past week. I realized that I'm having trouble maintaining an erections or ejaculating. I never had this problem until now. I get hard well, but lose the hard halfway through penetrative sex. I had to jerk myself off in order to ejaculated as no other means helped me finish. Could you confirm if this is because my body is used to being jerked off by myself while watching porn and if it would take time to adjust to be pleasured while actually having sex? Also, how much time would it take for my body to adjust to this?

I think that’s the reason