If its steel and integral to the frame get it to an LBS and get it aligned PROPERLY otherwise it will be a total pig to set up indexing.
If its a replaceable one then just replace it, its sacrificial component and its done its job. We had a nightmare job with a customers new bike that would drop its gear indexing after 30 miles without fail, turns out he’d dropped it in the garage and it had bent the hanger, he’d straightened it but omitted to tell us that wee fact (it was just out and no more) but as it had been bent what would happen is that it would flex with use thus the indexing would go. Replaced the hanger end of problem.