A student devoted to seeking sacred knowledge who cannot support himself is given zakat by the majority of scholars — either simply as one of the poor, or under fī sabīlillāh, which the Ḥanbalīs and many contemporary scholars extend to include seeking knowledge, though the majority restrict that category to military jihād; either way the poor-student case is agreed upon through the category of faqīr. An imam or teacher who already receives a salary that meets his needs is not given zakat merely because of his religious role, since zakat is tied to categories of need, not to office, and the Prophet ﷺ said charity is not lawful for a rich person nor for one who is strong and sound in body. If his salary genuinely does not cover his and his family's basic needs, he may be given zakat as a poor person like anyone else.
Q&A · Zakat
Can zakat be given to a student of Islamic knowledge or to a masjid imam?
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.