Generally the cracking noise is caused by gases being released from your joints. Basically, synovial fluid present in your joints acts as a lubricant.
The fluid contains gases oxygen, nitrogen, and carbon dioxide. When you stretch before exercise or at any time, you stretch the joint capsule, causing Gas to be rapidly released, which forms bubbles which in turn, pop to make that popping, cracking sound.
There’s nothing to worry about unless it starts to hurt when you pop/crack a joint. If this is the case, you should see your doctor.