In case you switched to android-
If you want to change to android you can,But I at start you will find it difficult to setup everything perfectly as in android you can setup almost every setting,and change of '''''''apple ecosystem'''''',no gestures[in pixel phones],may be rarely some crashes/issues,speed of animation over smoothness- default (But even you can change that),ios has better integration with mac OS/windows with itunes coz there are no first party apps for android;So, if you use your android phone with laptop/windows/macbook then you will have to use third party apps for your tasks[windows gives you full access to read,write,configure etc your data with some notification options, not more than that-[I don't no about macOS compatibility with android].
But with android you will get,
A better,user friendly user interface.
Full access to apps on play store.
Google services>apple services.
Access to 3rd party apps from any source(such as from internet download,from pc etc in supported form).
Access to download anything from internet.
Ultimate customization- totally customise in your way.
But if you go for pixel2/2xl, few things will remain unchanged such as,no sd card support,no headphone jack,only single sim,[along with display issue of the phone(pixel2/2Xl specific)<IphoneX's industry best samsung made display].Dual speakers (incase you compare iphoneX and pixel2/2xl,because both of them have it).
My Conclusion -If you upgrade to iphone X, u will get almost same experience in a different body.
But switching to android will change the way you use your phone.
If ever you decide to go with android then, I would prefer you to also check out one plus 5t/Galaxy note8/Lg v30+/upcoming s9,coz pixel 2 is not only the android phone ,there are many phones to choose ranging from cheap budget to flagship with varying features.
Finally its always your choice-android/ios