Purpose: X-Rays are used to see inside of the human body to look for fractures and other bony or soft tissue abnormalities.
Issue: X-rays are ionizing radiation. They harm cells and DNA. Exposure is cumulative and life long.
Frequency: X-rays are electromagnetic waves with wavelengths in the range of 0.01 to 10 nanometers, corresponding to frequencies in the range 30 petahertz to 30 exahertz (3×1016 Hz to 3×1019 Hz)
Better choice: Ultrasound is a better option since it is not ionizing radiation. It may not always be an available option though depending on the medical condition.
Source:
https://www.boundless.com/physics/textbooks/boundless-physics-textbook/electromagnetic-waves-23/the-electromagnetic-spectrum-165/x-rays-597-11175/