If that's the case why should everyone be careful if 90%+ had it already
1) I don't know that 90%+ had it. I'm theorizing that in shuls where people were already not being careful, most people got it, thereby lowering the possibility for further spread.
2) Immunity is thought to last between 3-24 months, with most people losing it around 12 months, give or take a few months. However, reinfections have started happening. Just because you got it during the first wave, doesn't mean you can't get it again now or in the next few months. And just because you were fine the first time, doesn't mean the second time will go the same way.
3) Not everyone got it, even if most did. Be respectful of other people's health. That doesn't mean close the shul. It just means take some basic precautions.