You need proper USB driver installed on your PC to be able to connect your Xperia X to PC (as also Xperia X performance and Xperia XA). Otherwise, you cannot transfer files between the device and PC, let alone use ADB or fastboot to flash a firmware.
BTW, if you are looking to work with ADB and fastboot, then use this link to install ADB Driver first.
→ Download the Windows USB driver for Xperia X, XA, X Performance.
Do let us know if you need any help in this regard.