Rotary encoder causing ripple noise on digit potentiometer
This is general: Be sure no digital circuit get its ground side supply current through the same wire which is a part of analog circuit ground wiring. Digital GND and analog GND can meet only in a single point which is the output capacitor of the power supply, C1 in your case.
Also be sure digital circuits cannot pollute your DC voltages in the analog side. You have V3=4V drawn as voltage source. How it's made? Hopefully it has a hefty capacitor to keep it clean. Making it with a voltage divider only can be disastrous.
Finally digital signals can be heard in audio if there's digital and audio signal wires in parallel with too small distance. That happens easily in breadboards and spaghetti wirings.
The previous hints cover only that noise which is caused by digital signals which leak to the audio. Digital (=stepped) volume control has another problem. If the noise can be heard only when the volume is adjusted and there's some sound in the audio, not for ex. a pause between the songs, the noise is the sudden voltage changes in the audio caused by the changes in the gain. It's not a leak from the digital circuits.
The fix is to have a circuit which prevents sharp voltage steps by timing the gain changes to the zero crossings of the audio signal. Your digital potentiometer has that capability. You must insert a zero crossing detector which enables the write latch (WLAT) when the audio is near enough zero. An easy version of it is a window detector made of 2 comparators.
It's essential to have the same zero point reference for the audio and the window detector. Your audio zero point is V3. Make the window tresholds with the same circuit which makes V3, use for ex 4 resistor chain as a voltage divider + capacitors to keep the voltages clean.