Hey deneth209,
We see that you have forgotten your passcode for your iPhone X and are concerned about data loss. We would love to provide some guidance to you in regards to your concerns.
To verify if you have had your data previously backed up using the iCloud backup services, sign in to the Official iCloud Website with your Apple ID credentials to see what information is able to be recovered: Official iCloud Website
You also can verify if you have ever backed your iPhone up to your computer (if you have one) using iTunes: Locate backups of your iPhone, iPad, and iPod touch
If you are unable to locate any of your data using one of the above approaches then unfortunately you will not be able to retrieve this data as you have forgotten the passcode. If you choose to restore the iPhone to remove the forgotten passcode prompt then you will lose the data stored on the iPhone because it will be returned back to factory default.
If you would like to move forward with restoring the iPhone so that you are able to use it again, follow the steps of this provided resource: If you forgot the passcode on your iPhone, or your iPhone is disabled
Best wishes!