If you altered something in your iPhone X's settings, you may have mistakenly blocked
Installing Apps under Restrictions, and if that's the case, you'll never be able to install an app on your device, no matter what you do.
Make sure Installing Apps is switched on or enabled in Settings > General >
Restrictions. If the switch is green, you know it's switched on. After then, see if the problem has been resolved by installing an app. If, on the other hand, all limitations are green, then there's a problem.