HomePod, assuming it can connect to the Internet at all, should pick up the network credentials known to your iPhone via iCloud Keychain. Certain actions, such as AirPlay, only work when both devices are on the same network. Ideally you would only have one network such that all connected devices can see each other through Wi-Fi. If you need a guest Wi-Fi that blocks device to device communications you wouldn't add the connection information for that to any of your own devices.
You can use Settings > Wi-Fi to change which network your phone is connected to. Are you saying these types of instructions no longer work? https://osxdaily.com/2021/06/13/how-change-homepod-wifi-network/
tt2