I have heard that you can’t get an erection after surgery. Is this true?

Depends on surgery. Many men have all sorts of surgeries, and afterwards have no problems with erections. Your question does not mention the type of surgery, but some prostate surgeries do have impotence as a side effect. Please send in another question to healthtap, with some details so that our medical experts can better help you. Thanks!
Depends on surgery. In general no unless talking prostate surgery.