There a lot of different reasons why you might be having a hard time getting an erection. Sometimes when we're mentally stressed or depressed, our dicks work (or don’t work) differently. One idea is to practice jacking off with a condom to make it easier to get hard when you're wearing a condom with a partner. You may also want to see a doctor to talk about other things that could be making it difficult to get hard, such as medications or medical problems like diabetes. Its great that you're on PrEP, but as you shared in your question - PrEP prevents HIV but not other STIs. Therefore we recommend you get tested for both HIV and STIs every 3 months.