That's the fundamental concept behind the old-school method of synthesizing vaccines, yes.
Unfortunately, developing a safe and viable vaccine by this method is a very slow process of trial and error; modern genetic engineering based vaccine development techniques are faster, more reliable, and...