Open the Settings app on your phone
Tap Sound and vibration or Sounds and haptics
Tap Ringtone
Select the song if it appears in the list
If the song is not listed, save it in your music library or ringtone folder first
On Android, use a file manager or ringtone app to move the song to the Ringtones folder
On iPhone, use GarageBand or iTunes/Finder to create and sync a ringtone
Set the imported song as the default ringtone
Save the changes and exit Settings
