I had a legal name change, but my name on one of my W-2's is still my previous name. Do I need to change this? If so, how do I?

I was under the impression that changing my name legally for SSA would automatically apply to the IRS. I've read online that may be incorrect, but nothing states how one would correct this.