This is pretty much the same issue discussed here Sound Bug/Issues
But since the last poster was warned about reviving the topic I’ll avoid doing the same. I can add to this though. It’s not just through headphones, the music will also crackle even if using the phone’s speakers.
I didn’t report anything sooner as I’ve used an iPhone 6s for the longest time so assumed it just couldn’t handle it as that is what it sounds like, the phone struggling to cope.
But I got an iPhone SE (2022) to finally retired my 6s and it has made no difference. It still crackles just as much now as it ever has.