The main reason X-ray telescopes are placed in space and not on Earth's surface is:
2. Earth’s atmosphere deflects X-rays from space.
X-rays are absorbed by the Earth's atmosphere, which prevents them from reaching the surface. Therefore, to observe X-rays from astronomical sources, telescopes must be positioned above the atmosphere, in space, where they can directly detect these high-energy photons.