Two houses is the easy case. When you go to the second house you might have to “forget this system” (to forget the old system), or you might have to “connect to existing system”. Much easier than the other possibilities.
It does vary. I have systems in three houses. I don’t have to do a damn thing any more to switch between them, just run a fresh instance of the Sonos app (ie force kill a version that may have connected to the prior version). Or I can use my own app, which doesn’t care about such things at all, it just connects, and prompts if it finds more than one on the same network.
Author of the leading independent Sonos apps for Android, MacOS, iOS, Windows and Xbox.