Hello Sunny
There is already an old thread about this issue in the Apple Support Community: Macbook Pro M1 16 inch popping audio. Apple's response to this is to have the computer serviced, which is useless because it happens on all computers of this type and is reproducible behavior.
We post here because our troubleshooting indicates it is a software issue and hopefully someone somewhere will see this and provide a solution.