Hair loss is related to fungus, fungus is related to UC. It's also related to bad health.
The way to stop your hair loss is to increase your health. You are almost exactly where I was when I was your age, but my hair loss started at age 25.
I had UC 10 years ago. The real problem was Candida. But the real problem wasn't Candida, it was actually my eating habits. Being fruitarian has reversed all illness.
Go to the Barefoot Herbalist forums on this site and learn as much as you can to improve your health imo. Your UC/ Candida symptoms will return eventually and it will be unpleasant.
Good luck. If you have any additional questons, pm me.