Based on work from similar coronaviruses, the spike protein was quickly identified at the beginning of the pandemic as an important component for viral binding to the ACE-2 receptor. It is one protein component of the viral shell, but has proven to be an excellent target, given its induced immune response to the mRNA vaccines.
Covid will not be able to mutate away from using the spike protein, but it will continue to evolve mutations within the protein as it responds to selective pressure. Fortunately, when the body creates an adaptive immune response through antibody or the T-cell receptor, this response is polyclonal. Think of it as not a single antibody to spike but rather a population of antibodies, all targeting a variety of residues on the protein. This is why most immunologists are not terribly worried about the variants that have emerged wrecking all of our immunization efforts—those variants are usually based on just a couple of mutant residues and so will not (generally speaking) be able to evade the population of antibody and t-cell responses that have been generated. You may have heard about monoclonal antibody therapies to covid ... those, unfortunately, are very susceptible to mutation because if a critical targeted residue mutates, you could lose all efficacy of the drug.
The only answer to rapidly mutating pathogens is an entire inducible population of neutralizing proteins in each of us and it’s no coincidence that we have this defense. If we didn’t, our species could not be here right now.