Check External Devices and Disconnect Accessories : Before troubleshooting any possible interference, it's essential to disconnect all accessories, including headphones, USB-C hubs, and external displays.
Restart Your MacBook to Flush Temporary Glitches : All too often, a quick restart washes away temporary nuisances from the system that are causing distortions in audio or crackling.
Update macOS and Audio Drivers : An out-of-date system can break audio. Go to System Settings > General > Software Update and download any patches.
Reset Core Audio via Terminal command : Open Terminal and type' sudo killall CoreAudio'. This command restarts the audio engine and is likely to resolve the crackling issue.
Make adjustments to the audio MIDI setup for output. Navigate to Applications > Utilities > Audio MIDI Setup - set output to 44100 Hz and 2ch-24bit Integer.
Check in Safe Mode to Rule Out Software Conflicts : Start your MacBook in Safe Mode; if the crackling goes away, it points to a third-party app causing the issue.
Check the Sound Balance and Volume Leveler : Navigate to System Settings > Sound. Please adjust the left-right balance to center and ensure the volume level remains stable and within the limits.