You can do this using itunes on a pc or mac. There are manuals online for it.
Also onvolved putting the file in the right folder and renaminf the extension so it will show up as ringtone, which you then can sync to your phone.
For instance: https://blog.udemy.com/how-to-add-ringtones-to-iphone/