So far, there are two completely contradictory answers, one saying they're complete synonyms, and one saying 'uncommon' is 'more common' than 'rare'. One has received a downvote for being 'misleading'.
My instinct was that @Jaime was right, but on reflection I realised that as a negative form of 'common', uncommon might acquire slightly different meanings according to context. However, this would be the exception to the general rule. I can't think of a sentence off the top of my head where the difference is significant. You probably need to use both words in close proximity before any distinction would be relevant.
For instance:
The crested newt has become uncommon in recent years, but is not yet considered rare.
But in both my example and @Biblasia's, 'rare' is being used in a more technical and scientific sense of 'rare animals', and it's the context of the usage that creates a distinction in meaning, not the words themselves.
So I actually think both contradictory answers can be correct, in some circumstances. However, I think as a general rule of thumb, you can treat 'uncommon' and 'rare' as exact synonyms, and therefore Jaime is more correct.
Edit:
I plead guilty to not having checked the dictionary first, but, the 2022 edition of the American Heritage dictionary says this:
un·com·mon (ŭn-kŏmən) adj.
un·com·mon·er, un·com·mon·est
- Not common; rare.
- Wonderful; remarkable. un·common·ly adv. un·common·ness n.
rare 1 (râr) adj. rar·er, rar·est
- Infrequently occurring; uncommon: a rare event; a plant that is rare in this region.
- Excellent; extraordinary: a rare sense of honor.
- Thin in density; rarefied: rare air.
It seems to me that the dictionary considers Jaime's answer closer to the normally-understood truth than Biblasia's.