For Apple Music in dolby Atmos and lossless with the original Homepods you need, at the moment, an Apple TV 4K, and to set the homepods as the apple tv default audio output. For now, the Homepods cant play Atmos or lossless content from apple music by themselves. That will arrive in the fall, with Homepod OS 15. Here a screenshot of the beta 1 settings.
Turn on lossless streaming and Atmos in the music app settings of the apple tv and you´re good to go. Make sure that both the homepods and the apple tv are in the latest 14.6 software version.