Subunit vaccines work by introducing these antigenic fragments into the body, which then stimulates an immune response. The immune system recognizes these fragments as foreign, mounts a response, and “remembers” them. If the actual pathogen is encountered later, the body recognizes and fights it off more effectively.