Download the YouTube audio using a legal method that respects copyright and YouTube’s terms
Save the audio file to your device in a supported format such as MP3 or M4A
Trim the audio to the desired ringtone length using a ringtone or audio editor app
On Android, open Settings
Tap Sound and vibration
Tap Phone ringtone
Tap Add ringtone or choose from your files
Select the edited audio file
Save or apply the ringtone
On iPhone, open the Files app or use GarageBand
Import the audio file into GarageBand
Trim the clip to 30 seconds or less
Export it as a ringtone
Open Settings
Tap Sounds and Haptics
Tap Ringtone
Select the new ringtone
Set the ringtone for specific contacts if needed through the Contacts app
Make sure the file is stored locally on the device before setting it as a ringtone
