Measure the diameter of the wire, and then choose a piece of heat shrink that will be large enough to slide onto the wire before heating but will still provide a snug fit once heated. The shrunken diameter should be slightly smaller than the wire's diameter to ensure a tight fit.
Heat shrink tubing has a shrink ratio that dictates how much the tubing will shrink once heated, so it's important to choose the right ratio for the job. For example, a length of 2:1 ratio tubing with a diameter of 2 mm will shrink to a diameter of 1 mm.
Measure a length of heat shrink tubing that is slightly longer than the damaged section of wire.
Most heat shrink tubing will also shrink longitudinally (around 5-15%), so be sure to give yourself enough tubing to cover the exposed area after heating.