Hi there matishmehta,
We understand you forgot your iPhone passcode and are worried about your data, and we'd be happy to provide you with the best information.
To get started, we do want to let you know that the only way to remove the passcode would be by restoring the iPhone using a computer. If you don't have a backup available after restoring your iPhone, then you may be unable to restore some data; however, any data that is synced with iCloud can be restored by enabling those items in Settings > [Your Name] > iCloud after restoring your device.
Additionally, learn how to redownload previously downloaded/purchased content here: Redownload apps, music, movies, TV shows, and books
If you need help with restoring your iPhone due to a forgotten passcode, check out this link: If you forgot the passcode on your iPhone, or your iPhone is disabled
We hope that helps.
Take care!