What determines whether we can create a vaccine for an illness or not?

HIV was hard to vaccinate against because, unlike SARS-CoV-2 and its spike protein, HIV uses the hosts' own surface proteins to invade cells.

The alternative is to target a viral protein necessary for its replication. This was a problem because HIV mutates so rapidly that it was hard to design a vaccine that wouldn't become obsolete almost immediately.

I keep saying "was" because the traditional method of designing vaccines was to mass produce an antigen for injection to train a patient's immune system. This requires making sure you have an efficient way to express and purify the protein in large quantities.

The mRNA vaccines are so revolutionary because all that's really necessary is the sequence of the protein that needs to be expressed. Instead of trying to mass-produce a viral protein with good quality and purity, which likely requires a bacterial, yeast, or insect cell-based expression system that wouldn't exactly mimic how the protein is made in human cells, you get the patient's cells to produce that protein instead.

/r/askscience Thread Parent