Not really emeralds are not rare because you can trade with villagers
Why Emeralds are rarer than Diamonds

Emerald ore (at least prior to 1.15) was the rarest ore bc it could only be found in the extreme hills biome. I'm not sure if ancient debris is rarer.

The rarest ore for the 1.18 ore generation which was put into 1.17 by accident is the deepslate emerald ore cuz it has to spawn below Y level 16 and under a mountain biome

Its not rarer if u mine in a extreme hills biom
btw its only that rare cause it only spawns in the extreme hills biom

the rarest version is deepslate emerald ore you need silk touch + Y level below 16 + under mountain biome
Diamonds and Ancient Debris are the best thing to get but emeralds are rarer than diamonds and Ancient debris