In the immune system, TGF-β has both immunosuppressive and immunostimulatory effects. It can inhibit the proliferation and function of T cells and B cells, thereby maintaining immune tolerance and preventing autoimmunity. Conversely, TGF-β can also promote the differentiation of regulatory T cells (Tregs), which play a role in maintaining immune homeostasis. Additionally, TGF-β can affect macrophage activation, influencing the inflammatory response.