Sorry, there was a problem with Apple Music
I'm gonna copy this verbatim, which another poster posted a few years ago. I have the same problem, intermittent, with both HomePods and HomePod minis, not being used as default speakers for my Apple TV. It happens most often when I request a playlist, as opposed to a specific album or artist. Very frustrating! Here's the post:
When I ask my HomePod to "hey siri, play some music." it replies "here is some music just for you" then there is a silence before it times out and replies 'Sorry there was a problem with apple music'.
The problem is intermittent and is temporarily fixed by removing the device from Home App and then re-installing it, but then the problem comes back randomly minutes, hours or days later.
Sometimes the problem goes away by itself for a little while.
The device is connected to the Internet because queries for "What's the weather like?" always succeed.
HomePod (2nd generation)