But as we know that kinetic energy is a relative quantity and can
change from one frame of reference to another.
That is true only at the macroscopic level.
There are two kinds of kinetic energy of the gas. There is the internal microscopic kinetic energy of the gas. That is due to the random motion of the gas molecules. The average translational kinetic energy the gas molecules is responsible for the temperature of the gas and does not depend on an external frame of reference. It is part of the internal energy of the gas.
Then there is the kinetic energy at the macroscopic level. This would be the kinetic energy of say a container of gas moving relative to some external (to the container) frame of reference. That kinetic energy is reference frame dependent.
This leads me to the conclusion that temperature is a relative
quantity but I think that it might not be the case due to randomness.
So which one is true? Is it relative or not?
Temperature is not a relative quantity. You are right the temperature is due to random motion. The macroscopic kinetic energy of the container of gas has no effect on the internal kinetic energy which is based on the internal random motion of the gas particles.
It is worth noting if the constant velocity of an insulated container of gas resulted in an increase the temperature of the gas, then we would have a way of determining absolute motion in an inertial reference frame. A person measuring the temperature of the gas in the lab would get a different result than a person measuring the temperature of the same container of gas while traveling at constant velocity relative to the lab frame. That would violate the special theory of relativity.
( If it is not then surely we can't define a temperature of a single
or 10 or 100 atoms as then randomness won't be that profound 'the'
temperature will be relative. )
There has been considerable debate on this. See the following: Can a single molecule have a temperature?
Hope this helps.