Uhh... this is literally how all vaccines work. Like, ACTUALLY vaccines not the mRNA stuff, this is how the body's immunology response is supposed to work. Foreign invader enters the body, body detects it, analyzes it and then creates specialized antibodies to seek and destroy the invader...