Create or obtain the audio file in M4R format
Make sure the ringtone is 30 seconds or less
Save the file to your computer or Files app
Connect your iPhone to your computer with a USB cable
Open Finder on Mac or iTunes on Windows
Select your iPhone
Drag the M4R file into the Tones section or sync it
Wait for the transfer to finish
On iPhone, open Settings
Tap Sounds & Haptics
Tap Ringtone
Select the new ringtone
If using GarageBand, import the audio into GarageBand
Trim the audio to 30 seconds or less
Export it as a ringtone from GarageBand
Assign it in Settings > Sounds & Haptics > Ringtone
