Now those aren't things you can casually observe all that useful information from, so it doesn't really help that much other than to try and buy quality components and hope for the best, often if you want good onboard sound you can find it if you are spending a reasonable amount on the board to start with though and not using and underspecced or dirt cheap PSU. A sound card could alleviate some potential issues though either because you bought a cheap board or just from being lied to by marketing that you were getting better onboard sound than they actually built. But it is still located on your motherboard and near a bunch of other things running at their own frequencies which may or may not be a problem depending on location and shielding and components.
And for all those reasons, a lot of people have skipped the sound card route and got a USB DAC, which gives a lot of physical space between all those other components and eliminates some restrictions in form factor for being inside a computer.
One thing to look at before you do anything else, look at where your analog speaker line is running. Is it now crossing near your PSU or power cords? Is it a different cheaper cord? The lowest hanging fruit for sound quality is the longest and final analog run and it is always good to try moving it around if you suspect a problem.