iPhone X stuck in recovery mode after maxing out storage. Getting "Error Code 14"
If the iPhone is currently stuck in a reboot loop, try to enter DFU mode and restore it using iTunes.
DFU mode is entered by:

Connecting to Mac with Lightning cable
Press Volume Up, then Volume Down quickly
Press and hold right (Standby) button until display goes dark (about 10 seconds)
Keep holding Standby and also press Volume Down for 5 seconds
Keep holding Volume Down, but release Standby button

While the display stays black, iTunes or Finder should say that it found an iPhone in recovery mode and you will be given the choice to return it to factory settings which will wipe the storage and apply the latest firmware.
Entering DFU mode from a reboot loop is very tricky, since it is likely to reboot before you are finished. Try to start the procedure as soon as the Apple logo is displayed and don't be discouraged if you need a few tries.
If that doesn't fix it I would contact Apple, maybe the storage is faulty. Flash storage needs free space for wear leveling and running it near full for a long time can cause a lot faster aging of the memory cells. I would recommend keeping at least 20% free space to counter that.