LHC has a center of mass energy of 14 TeV, pretty close to the mentioned 18 TeV. That's however for protons, not photons. You really can only accelerate charged particles, as we use magnetic and electric fields for that. You need roughly a factor of ten higher energy of the charged particle to produce a certain energy gamma ray.
Proton collisions are messy, and not the best way to get photons at certain energies. There is a new up to 1 TeV electron collider planned in Japan [1].
Note however that these 18 TeV are only the highest energy Photon from a GRB. LHAASO observed gamma rays up to 1.4 PeV from other sources (mostly galactic super nova remnants) [2].