It Depends Upon the Options
When you’re affected by the same thing multiple times, only one
instance applies, using the higher level of the effects, or the newer
effect if the two are the same level. For example, if you were using
mage armor and then cast it again, you’d still benefit from only one
casting of that spell. Casting a spell again on the same target might
get you a better duration or effect if it were cast at a higher level
the second time, but otherwise doing so gives you no advantage.
The rule points out cases where "you're affected by the same thing multiple times", even giving a spell example in mage armor. The effect of mage armor is an item bonus to AC and potentially saving throws, and casting it again would give exactly the same effect to the character.
It does note that casting a spell again at a higher level might give an enhanced effect, so casting a second more powerful mage armor would give a larger bonus.
The effect of resist energy is that the target and their gear gain resistance to the chosen damage type. For the same reason as mage armor, resist energy (fire) wouldn't stack with another casting of resist energy (fire) and just the highest level or newest casting would apply.
However, is resist energy (cold) the "same thing" as resist energy (fire)? It grants the target substantially different effects between castings, so I would say this isn't a duplicate effect on the target.
An alternate interpretation could be that the "same thing" is the spell being used, but based on the title of the section that rule comes from, duplicate effects, this seems to be a better way to interpret the interaction.
The final line under duplicate effects about casting a spell again giving no advantage would be explaining the generalized case, for the vast majority spells that always grant the same effect to the user. This is in line with the overarching idea of this answer, that these rules cover duplicate effects instead of duplicate spells.
With Other Sources of Energy Resistance
Another case to consider, what if the target of a resist energy (fire) spell was also wearing a ring of fire resistance? If that target was exposed to fire damage, which of the fire resistance effects would block the damage?
I'd say this is a case where the creature does have a duplicate effect, fire resistance, and that the highest level (depending on heightening) or most recent effect (the continuously applied ring) would likely apply.
Note also that the resist energy protects the target's equipment while the ring does not. This means that even if the ring was stronger or more recently applied, the spell would be protecting the targets gear. Only the duplicated part of the effect would be ignored in either case.
Additionally, a heightened resist energy (fire) that gave fire resistance 10 or 15 would be the "same thing" as fire resistance 5 given by some other source, following the same reasoning as with mage armor. And by the final line under duplicate effects about getting better effects, the higher resistance would apply.
Spells can do all kinds of things, so this really needs to be evaluated on a case-by-case basis. If the effect of one casting would be the same as any effect currently on the character, then it should be resolved by following the rules for duplicate effects.