I play my music though an Airport Express at home. It has always been a bit flaky at times, but most of the time, it worked fine. With my M1 mac, though, it pretty much stopped working. If I try, the airplay icon in the Music app turns from blue to black with some sort of error indicator on it. I have gotten it to work a few times, but mostly after a reboot of both the mac and the airport express. And, ironically, once when I wanted to listen to music through headphones, and it played on the airport express instead.
My current solution is to play music from an old iphone 6s, sharing music from the Mac. But it often loses its authorization to share music from the mac, so I have to restart the app and reconnect. This takes time, as it seems to need to download all the metadata from my music library each time. Also, sometimes the volume drops to zero and cannot be moved. This is cured by switching output to the iphone speakers and back to airplay. Not at all a great experience. So now I am looking for a non-apple way to play music at home. Most likely a raspberry pi or something like that.