You’re referring to the screen lock passcode? There is one, and only one way to reset that. You must erase the device by restoring it in iTunes. There is no other mechanism. Even if you took it to an Apple Store, that’s all they could do as well. iOS has been deliberately designed such that is the only way to reset a device when you don’t know the screen lock passcode.
Once erased, you can restore your data from your iCloud or iTunes backup. Things like contacts will re-sync to your device when you sign back into your iCloud account, assuming you’re using the iOS contacts app and sync it with iCloud.
See -> If you forgot the passcode on your iPhone, or your iPhone is disabled - Apple Support