I have a very similar problem with Asus motherboard. Model name of the motherboard is ASUS Tuf b460 plus. Here is what I found out which I think is a problem with either Realtek not being compatible with windows 10 or windows 10 does not bother fixing. No idea.
I go to Asus website and download the audio drivers. I extract them and I have two options to chose from when it comes to install the sound drivers. I have AsusSetup.exe and Setup.exe. When I run AsusSetup.exe, the drivers are installed and I have the Realtek audio console. This way the crackling happens in the speaker. For example when I play a music or games, I can hear some kind of noise, interference or crackling. Feels like cables on the 3.5 jack slot are not properly touching the motherboard sensors inside the 3.5 jack hole. This way I have the noise with the Realtek audio Console. BUT, when I run Setup.exe, the drivers are installed and from High definition audio device they change to Realtek but no Realtek Audio console is installed. There is no crackling and everything works fine but I don't have the Realtek Audio console. Something is wrong with the console that is causing this problem. So I wonder how can this be possible? This Audio console is adding something to the drivers that it's doing this crackling.
Most of people here keep writing the same useless information which does not solve this problem.
My understanding is that the audio console has to be reworked so it works fine.