Your immune system has three main functions
Your immune system fights and protects you from potentially harmful pathogens. These pathogens may come in the form of viruses, bacteria, fungi, or yeasts, and are different from our natural microbiota. Your immune system must recognize and tolerate you (your body and all the ‘good’ microflora inside you). This tolerance extends to your cells, the food you eat (unless it carries harmful bacteria), and your indigenous microbiota. Your immune system is constantly determining if newcomers in your body are dangerous.
Your immune system helps repair any wounded tissue you may have, no matter how big or small. Your immune system helps repair wounded tissue from a scratch from a rose bush or the graze when you fell off your mountain bike.
Your immune system also gets rid of all the dead cells you accumulate every day. (That in itself is a huge undertaking.)
Your immune system is constantly working hard to keep you healthy and functioning.