Question: how to assign ringtones to contacts on iphone x?
Answer: Go to the Contacts app (which may be hidden in an automatically created folder) and select on a person's name.
In their contact details, press Edit in the top right corner.
Scroll down until you see Ringtone and Vibration. ... 
Below this, you can repeat the process for messages, by select Text Tone and Vibration.