Pop and thump sound coming in through speaker when turning the class D amplifier ON
A thump on startup of a audio system is usually due to DC offsets settling.

For example, consider a amplifier that works on a single 12 V supply.  Internally, the quiet level is a flat 6 V.  However, when the circuit is first turned on, that 6 V node starts at 0 V.  During the time the system is stabilizing, it can look like there is a large 6 V signal.  Depending on what order various parts power up in, that can produce a "thump" sound in the output.

There are various ways to deal with this.  Some systems deliberately delay the power up of the final output drivers.  I've even seen relays on the outputs of a high power amp.  Those delayed connecting the speakers until the amp circuitry had settled.