Question: I arrived at Shul and realised that I had forgotten to make my eruv tavshilin. Should I have just relied on my Rav to have made eruv tavshilin on my behalf?
Answer: The Shulchan Aruch (OC 527:7) writes that the Rav should make an eruv on behalf of anyone in his community who forgets or loses theirs. However, one cannot rely on this instead of choosing to make one. One who forgets two consecutive times is no longer considered accidental and it would not help to rely on this (Baer Heitev OC 527:6).
If one arrived in shul and realized that they had forgotten to make an eruv before Yom Tov, they should go home if they can still make one before Yom Tov. Alternatively, one may call home and ask someone else (such as one’s wife) to do so on their behalf. The Tiferes Yisroel (Beitza 2:1) writes that one can designate food that they have at home, and omit the words behadein eruva, with this eruv. However, R’ Yitzchak Yaakov Weiss (Minchas Yitzchak 7:36) writes that this will not work. One who does so would be in violation of sating a beracha levatala as well as cooking on Yom Tov for Shabbos.
The Mishna Berura (527:4) writes that one who forgot to make his eruv before shekia may do so (even with a beracha) during bein hashemashos (the period of time between shekia and tzeis hakochavim, nightfall). This would not apply once the shul had begun davening maariv or he had otherwise accepted Yom Tov upon himself.
In an emergency, the Shulchan Aruch (OC 527:22) even allows making one under strict conditions on the first day of Yom Tov (in chutz la’aretz), though this does not apply on Rosh Hashana (as there is no safeik deyoma).
In conclusion, while the Rav should make eruv tavshilin on behalf of others, that should only be relied on in emergency situations. One who came to shul and realised that they had forgotten should go home to make it or contact someone at home to do so on their behalf.