Like all devices in the Apple ecosystem, the synchronization options between HomePod smart speakers and iPhones are very straightforward. Simply by bringing the iPhone close to the HomePod, audio content can be transferred. However, if you have a HomePod speaker on the nightstand where you keep your iPhone, it's a good idea to disable music transfer between iPhone and HomePod.
If you don't need this audio transfer feature from iPhone to HomePod, you can disable this option by following the steps in the guide below.
How to disable music transfer between iPhone and HomePod when devices are nearby
"Transfer to HomePod” or the transfer of audio content between iPhone and HomePod is done through AirPlay technology. Thus, when you have music or a podcast playing on your iPhone and bring the device close to a HomePod speaker, audio content will automatically play on it. Also, the transfer of audio content is done in reverse, from HomePod to iPhone, simply by bringing the iPhone close to the HomePod's touch surface.
If you don't want to disable automatic transfer of audio content between iPhone and HomePod when the two devices are nearby, all you have to do is go to the iOS settings menu and disable the "Transfer to HomePod" function.
Settings > General > AirPlay & Handoff > Transfer to HomePod
After disabling this feature, you can leave the iPhone near the HomePod without any audio content transfer between the two devices.