This happens because of the static electricity.
Step-by-step explanation:
Static electricity is the type of electricity that is generated in bodies due to friction. In the doorknob, different persons open and close them to open and close the door. This results in the generation of static electricity due to friction.
As the friction increases the static electricity increases. When after a considerable time the doorknob is touched, a mild shock or a crackling sound can be heard from the knob. In winter it’s increases because of the increase in changes of friction.