Answer: They are similar
Explanation: First they both cure the pain, the one thing you have to be very careful of is the immunity part because some people can get immunity mixed up with anesthetics just to remind you the definition of immunity is
the state or quality of being resistant to a particular infectious disease or pathogen.
And cure is
is relieving (a person or animal) of the symptoms of a disease or condition.
CONCLUSION: Ultimately, This is why Anesthetics are similar to vaccination.