Cracking your neck causes the capsules in your neck to stretch.
These capsules that are contained in our necks contain fluids and when the capsules in our neck are stretched it prevents the capsules from putting too much pressure on our joints.
When you crack your neck and hear a popping sound that is caused by the fluid turning to a gas and then the gas being released.
Popping your neck can be okay but avoid doing it too often because it can cause more harm than good especially if done incorrectly.