how does the wrc rally classes work?

I am confused. Is Rally1 Rally2 until Rally5 like in Formula one where F1>F2>F3>F4 and so on? But other times its called WRC1 WRC2 WRC3 and so on. and then theres the R5 Class which is the same as the Rally2 class. And also somehow all the rally classes are made in different years. Rally2 class is made in 2013 while Rally1 is made in 2022, how does it all work?

https://preview.redd.it/g9tr2fpqz9de1.png?width=1024&format=png&auto=webp&s=d90e7eb4f44f7713942336dab2af7e758891ac26