I have no idea why you're losing contacts on your iPhone, however, if your contacts are associated with an email service like iCloud, Yahoo!, Gmail, Outllok.com and AOL, all you have to do is configure the service with your device and then enable syncing of your contacts. Your online contacts will then sync to your device.