Sound quality is subjective but overall poor components will have an adverse effect.
End to end: sound source (origin) to speakers through room to ear.
Resistance, impedance, cheap materials/components, low quality assembly, loose connector fits, etc. can and do alter fidelity.
Such problems may introduce crackles, small signal losses , distortions that you will find annoying.
For the most part good quality (i.e., probably higher priced) equipment and cables are needed. However, I often read that some things, such as expensive audio cables add little performance value for the extra costs.
Software and hardware is available to help compensate and adjust audio more to your liking.
For me, tinkering with the bass is about all that is necessary. Maybe the balance from time to time.
Will defer to the more serious audiophiles here as to what may help you with sound quality per se.