Immunological functions of tonsils and possible effects of their removal are still controversial. But many studies have shown that tonsillectomy has no clinical significant negative effect on the immune system. There may be certain changes in the cellular and humoral immune systems, but these alterations are clinically insignificant and no increased frequency of immunomodulated diseases may be expected.
The removal of tonsils (tonsillectomy) can have some impact on the immune system since tonsils play a role in filtering out pathogens. However, the immune system is complex, and other immune organs can compensate for their absence. For most people, the overall effect on the immune system is not considered significant. If you have concerns, it's best to discuss them with a medical professional.