It depends on some conditions which I can’t determine from the description you’ve provided. Assuming that the existing chimney was constructed using galvanized steel double wall pipe and only inner layer developed that crack, installation of a single wall galvanized pipe within that existing chimney should be sufficient. This is also under the assumption that all connections of a 4” liner have been properly performed – it must be secured to the water heater’s connector and at the top of your chimney.
If that crack appears on the outer wall of the double wall vent pipe it might be necessary to replace everything. A professional would have to determine this by careful evaluation of an entire chimney stack. Cracks along the outer layer of the B-Vent (double wall vent pipe) could result in rain water leakage inside the chimney promoting corrosion and causing damage to your appliance (if those cracks are above the roof penetration / outside). If they are inside and the inner pipe becomes compromise for any reason, exhaust could leak into your house, wall, attic, etc.
In case you have a masonry chimney with a metal (old) liner and a new 4” liner has been installed within the old one, everything should be fine.
There are also local laws / requirements which might be slightly different in your particular area but the contractor should be aware of them and perform repairs accordingly.
I hope that helps, please let me know if you have any additional questions.