Question: how to retrieve accidentally deleted contacts on iphone?
Answer: Go to Settings > General > Storage & iCloud Usage > Manage Storage. ... 
Once you've found the iCloud backup you need, restore your iPhone to factory settings. ... 
The erasure will take a few moments. ... 
You'll be asked if you want to recover your iPhone from an old backup.