as salam alaikum
according to some scholarly views, the term "Rafidah" existed before Zayd Ibn 'Ali and it was used to indicate those who oppose someone or something, especially an adverse established government.
In some Sunni sources, after the uprising of Zayd Ibn 'Ali, the term was attributed to those who deserted him when he reportedly refused to dissociate himself from the Shaykhayn. According to this view, from this episode onwards, the term "Rafidah" was referred to indicate those who rejected the Shaykhayn or the three caliphs. Zaydi sources however attribute the Rafd (rejection) to the "rejection of Zayd" or the"rejection of jihad" in more general terms. The Zaydis were among the firsts - if not the first - to write against the Rafidah meaning the Imamiyyah.
Eventually some segments of the Imamiyyah took pride in being called "Rafidah" and in several Imami sources the term has been used with a sense of honor. However not all Imamis nowadays like to be identified as such.
Later on, in Sunni rijali books a distinction was done between a "Shi'i" as one who preferred 'Ali over all companions, and a "Rafidi" as one who rejects the three caliphs.
With prayers for your success.