YouTube Music is now compatible with HomePods, as announced by the product head Brandon Bilinski on Reddit. You can now ask Siri to play songs from the service or make it your default music source on your Apple smart speakers. You can follow the steps on this support page to set it up.
HomePods have limited options for third-party music services so far. Besides YouTube Music, only Deezer and Pandora have added support so far. Spotify can be controlled by Siri on HomePods, but not connected directly to the speakers.
To use YouTube Music on your HomePods, you need a YouTube Music or YouTube Premium account. In the app, tap your user icon, then Settings > Connected Apps > Connect with HomePod. To make it your default service, open the Home App, tap the settings icon, then Home Settings > Your username > Default Service.
If you don’t see the "Connected Apps" option in YouTube Music, try closing and reopening the app. You may also need to update the app to the latest version.