Hello.
If you are comparing your erections now to what you used to have at the age of 20, then it's a natural process. It has been studied that the strength of erection at around 28 years of age is almost 1/5ht of that at the age of 18-19 years.
But if you have noticed the change recently, it is a possible effect of the illness as well as the medication. The medication you take is known to affect the sex drive.
You could watch over a few weeks if your problem varies with mood. If it does, you have your answers.
Please do not attach a lot of anxiety and/or guilt to this problem. It may be a phase which you will recover from soon.
Regards
This post is for the purpose of providing medical information and is not a substitute for a face-to-face consultation with a doctor. This post is not intended to give or rule out a diagnosis, create a doctor-patient relationship or replace an existing one.