The phone has to have internet connection through data, obviouslly not wifi because if you reset, you haven't configured your wifi yet. So you need to be in an area with good data connection.
Secondly, once you reset, you will be prompted to sign in your microsoft account where you backed up your apps/settings to the cloud before you reset. Once you sign in, it will prompt you to restore or not, obviouslly if you want to restore, you choose restore.
The issue is, if you skip the signing in part because you have no data connection, you will not be prompted to restore when you try to sign in after the phone is configured. At least i wasn't able to when i did it. So you MUST restore with data connection when you are prompted to sign into your microsoft account right after you reset.