iPhone 8 comes with 2 GB of RAM memory and iPhone X has more variant like 3 GB and 4 GB also.
iPhone 8 and iPhone X both are coming with same processor Apple A11 Bionic, M11 co-processor.
First time iPhone X is coming with the OLED display which is IPS LCD display and mostly used by higher models of Samsung and LG.
iPhone X is compatible with the next 3 updates of iOS.
iPhone X is available with high internal space like 256 GB.
If you are talking about price, it is very costly than iPhone 8.