Why does my cold water pipe make loud ringing noise only when the weather is cold and when we run the hot tap?

It may be in the main cold water shutoff or if you have a water pressure reducer it may be in the reducer manifold