I had hemorrhoid surgery a year ago, but I still feel discomfort when I go to the restroom. What can I do?

Depending. On how the surgery was performed, you could now have a fissure or tear or a stricture if it didn't heal properly. See a colorectal surgeon if the surgery was performed by a general surgeon.
See your doctor. Depending on the discomfort, you could still have hemorrhoids or more likely an anal fissure (a tear in the skin of your anus). This can be diagnosed on an exam and treated appropriately.