Hot molecules move around more than cold molecules. The molecules in hot drinks move around therefore they go up into a cookie because of all the movement.
All things are made of molecules, which are affected by temperature. Heat makes them move faster, which would make them mix faster with the cookie molecules.