Go to settings and in the search box at the top type 'bac' and before you finish background apps should come up, select it and make sure you did not turn off music.
Also, are you currently in battery saver mode? Is there something that might sorta look like a leaf to the left of your battery icon? If so, turn it off, or add music as an exception to run in background when in battery saver mode (just search settings for battery saver).