Open the Home app on your iOS device. If you do not have the Home app installed it can be downloaded from the Apple App Store. In the Home app select the HomePod you want to access, then tap Details. From here you can disable Allow Explicit Content. Now your HomePod will not play songs or albums marked for explicit content.
Only the person who initially set up the HomePod can access the settings on their connected iOS device.