If your HomePod isn’t responding, you should unplug it from its power source, then plug it in again. If that doesn’t work — and ONLY if that doesn’t work — should you reset it to its factory settings.
However, if you must do this, you can use the Home app to reset the HomePod to its factory settings by following these steps:
On your iOS device, open the Home app. Make sure that your iOS device is signed in with the Apple ID that you used to set up your HomePod.
In the Home or Rooms tab, press and hold HomePod, then tap Details.
Scroll to the bottom and tap Remove Accessory.
If you can’t remove the HomePod from the Home app, you can press the top of HomePod to reset it to its factory settings. Here’s how:
Unplug HomePod, then plug it back in.
Press and hold the top of HomePod. Make sure that you keep your finger on the top of HomePod the entire time. If you lift your finger, you’ll need to start over.
As you press the top of HomePod, the white spinning light will turn red and Siri will say that your HomePod is about to reset.
Keep pressing the top of HomePod until you hear three beeps.
(This how-to is based on my experiences and info on Apple’s support pages — where the images sometimes come from.)