I don’t think there is intrinsically an upper limit to photon energy possible, but there is an upper limit to temperature, the Planck temerature (around 10^32 IIRC).
There is a constant c in nature that has dimensions distance per time, and it is the limit at which causality spreads, and also the proportionality constant between the mass and enery manefestations of information (turns out that mass and energy are actually constructed out of information, and a bit weighs about 10^-65 kg). That is, c is the limiting speed at which distant things can interact. In special relativity you can construct graphs relating time and distance, and do coordinate transforms to represent the view of observers moving at different relative speeds. An event at a time and place radiates “world lines” at the velocity (slope) c, and other events at other times and places can possibly be caused by the first event if they are between its world lines, but not if they aren’t. This is powerful because causality works the same way regardless of the observer. There is no way you can move that will have you see effects preceeding causes.
Now, then - light, and X-rays and gamma rays and radio and all the other forms of electromagnetic radiation travel at the speed c. In lay speech it is common to refer to c as “the speed of light”, but this might create the mistaken impression that light itself is somehow fundamentally important in c. They aren’t. It’s simply that nothing slows EMR below this fundamentally limiting speed. Similarly, the USA is the country of Cecil Adams, but having everybody call it that would imply something more than it should.