The iPhone X is water resistant, not waterproof. You can get a bit of water splashed on it, or have it out for a bit in a light rain, but it cannot be submerged.
Per another post on the subject:
Apple strongly recommends against submerging the phone for even a moment. Or using it near large amounts of moisture.
Read here:
About splash, water, and dust resistance of iPhone 7 and later - Apple Support
To prevent liquid damage, avoid these:
- Swimming or bathing with your iPhone
- Exposing your iPhone to pressurized water or high velocity water, such as when showering, water skiing, wake boarding, surfing, jet skiing, and so on
- Using your iPhone in a sauna or steam room
- Intentionally submerging your iPhone in water
- Operating your iPhone outside the suggested temperature ranges or in extremely humid conditions
- Dropping your iPhone or subjecting it to other impacts
- Disassembling your iPhone, including removing screws
Water damage is not covered by warranty.