When we use the word photon to describe them, we are concerned about their particle properties. When using the term electromagnetic wave to describe them, we should pay attention to their fluctuation. Any microscopic particle has "wave-particle duality"
The main difference between X-rays and gamma rays lies in their different sources. Due to different sources, their bands (wavelengths) are generally different. Common gamma rays have high frequency and short wave length. (But there are also low-frequency gamma rays and high-frequency X rays. )
Of course, because they all belong to photons, photoelectric effect will occur. (On the premise that its energy must be greater than the work function of electrons in the target substance) (In addition, the target substance is not necessarily a metal, but any substance can be used). In addition, the statement that "gamma rays have higher frequency and greater energy, so they are more prone to photoelectric effect when interacting with the same metal" is extremely wrong! This involves a lot of professional knowledge, so I won't go into details. )