You keep whatever you have backed up in the cloud. This will automatically be your OneDrive access, Your Contacts and Calendars from your email accounts (just sign back into them). Probably a lot of your emails as well. There is a specific part of backup for emails and texts. Did you agree to have backup engaged when you set the phone up? It could even be settings, Apps installed and your start screen layout. Depending on what you selected... Signing back into your accounts gets you a lot of stuff back. Signing into the same Microsoft Account gets you your App ownership restored.
You would most likely loose progress inside of games. Most don't save to the cloud anywhere. You definitely lose any Apps that are no longer published.
Before resetting your phone though... It kind of sounds like hardware. It may just be a loose connector. Have you thought about having a repair shop look at it?