Data Recovery can still be possible, even though you may have forgotten your credentials. We always recommend that you back up your iPhone.
Restore iPhone X – Restoring your iPhone will remove your data, but it will safely get you back into your phone.
iCloud to fix iPhone X – Before restoring, we recommend that you back your phone up before using the Restore option. This will secure your photos, notes, and other relevant information.
Conncet to iTunes – Plug your iPhone X into computer – Access iTunes – Choose your device that you want to edit – Restore device – Recovery mode if it does not work. The above instructions should take care of your needs in regards to accessing your phone, be it on its own, through iTunes, or through iCloud.