Like others have mentioned, it is most likely estrogen imbalance.
FInding the balance it tricky; sometimes with TRT your body will find it on its own over time.
But other times it needs help - and things like Arimidex or Letro can help.
Letro, which is what I use on cycle when my test is very, very, very high, is incredibly strong and helpful.
I like it because it takes estrogen way down (be careful about going too far down) with only one small (.25) dose every 5 days. But it’s harsh and takes some experimenting. First time I tried it I did 1mg and for the next three days my joints hurt and I was so tired I couldn’t move.
Regarding, specifically, erections: usually (at least for me) morning wood is a good indicator that I’m spot-on with my levels. I don’t have to have rock hard boners all day (on cycle that’s nice) when I’m running my TRT, but pretty solid erections on demand should be do-able on TRT with estrogen in check.

Take notes about when you dose and how you feel. Don’t try to guess. You’ll thank yourself in the end. And note physical and mental feelings - both are very much affected by test and estrogen imbalances.