The COVID-19 vaccine (depending on the brand) can be 60-91% effective in protecting you from getting the virus! Getting booster vaccines can especially make effectivity go up.
Along with protecting yourself from getting the virus, the vaccine can also stop transmission of the virus to others. In a study by WHO, the risk of COVID infection cases in household contacts who were vaccinated was about 50% lower than household contacts that were unvaccinated.
Herd immunity is when a large portion of a community, also known as the "herd", becomes immune to a disease, making the spread of disease from person to person unlikely. As a result, the whole community becomes protected, not just those who are immune to the virus.
The COVID-19 vaccine not only helps you build immunity so you don't catch the virus, but also makes COVID-19 symptoms less painful and severe if you do happen to get COVID-19, making it less likely for death. To learn about COVID symptoms, visit this page of the website.
By vaccinating, it can stop new variants of the COVID-19 virus from developing (like the Omicron variant). The more opportunities a virus has to replicate itself, the more opportunities it has to mutate and become more severe.
Source of information are the WHO, India's Ministry of Health and Family Welfare, the CDC, Co-WIN, and Health Cluster