Hey! Thanks for coming to the community for help :)
When on your iPhone, click the gear icon in the top right corner of the "Your Library" screen to get to settings, then "Explicit Content," and switch "Allow Explicit Content" to off. If you don't see this option, double check to make sure your Spotify app is up to date!
Hopefully this helps! (and if it does, marking this as a "solution" will make it easier for others with the same problem to find)