Erections occur because blood is trapped in special veins in the penis. The blood gets there, and is trapped, as a result of nerve signals coming from the brain. Those nerves are traumatized, or even cut, during surgery removing the prostate. That trauma lasts 6-24 months while the nerves recover and grow back. The problem is, the special vessels which keep the blood in place during erection can shrink and even die without the constant nourishment of new blood. That's why we have spontaneous erections most every night, to keep the system functional.
Penile rehab is focused on getting blood into that area on a regular basis. Methods used include use of viagra class medicines, vacuum erection devices (penis pumps), and masturbation-like activity. Urologists may or may not be interested in helping with this. At a minimum, they should be prescribing viagra or cialis after the surgery.
I found the following to be a great source of information and help. Using the methods described in the online program I found there, as well as working on maintaining a semblance of sex life with my wife, helped me return to full functioning within 9-10 months following surgery, at age 74.
https://melissahadleybarrett.com/penile-rehabilitation-program/
It's a frustrating process, as results are not apparent as quickly as, say, rehabing after a sports injury. But persistence and consistency pays off for many men. It's certainly better than hoping that everything will just take care of itself.
Thanks. I’ll check it out.