又 is used in declarative sentences and describes the simple repetition of actions. This repeated action has already occurred once in the past.
S 又VO了
北京昨天下雨了,今天早上又下雨了。
再 is used to express something that has already happened and will happen again.
(S) (想/要)再 v # mw + noun
早上我喝了三杯咖啡,现在我想再喝一杯咖啡。
(S) (想/要)再 v # 次
我去年去了中国,今天寒假我想再去一次。
However, when there is 要,想,or 是,you should only use 又。
Subj. + 又 + 要/想/是 Verb + Obj.
昨天考试了,明天我们又要考试。
早上我喝了三杯咖啡,现在我又想喝一杯。
怎么又是你?(How come it's you again!)
昨天我背(bèi,to recite)课文,今天又是我背课文。
reference
https://resources.allsetlearning.com/chinese/grammar/Comparing_%22zai%22_and_%22you%22