The vaccine is a measured, limited, non-self-replicating dose of spike protein RNA which your cells fold into spike protein. Nearly all of it ends up in the lymph nodes near your armpit, where your immune system learns how to destroy it (and then does).
A COVID infection is a self-replicating, theoretically unlimited dose of spike protein RNA which your cells fold into spike protein. If you’re lucky, it’ll mostly affect your respiratory system. But if your immune system can’t respond quickly enough, it will spread and replicate all over your body.