If you mean "shared" music, as in Apple Music and Family plan, you may not be doing anything wrong. Sometimes it just doesn't work very well. The solution is generally to log everyone out of the family plan, get rid of the family plan, reestablish the family plan, and invite everyone back into it. There are intermediate steps you could take. But they often don't work. And this is where you end up anyway. Hope that helps.
If you are referring to the Home Sharing feature in iTunes, just make sure all devices are on the same wifi network. Otherwise, you will have to be more specific about your question.