Vaccines can only prevent infections of strains that you do not already have. The vaccine is only effective for people under age 26. There has not been any proof it helps older people.
A healthy immune system can clear (make it dormant) the virus for 90% of the infected. HPV never leaves the body (for men and for women). Should your immune system get low due to illness, then the virus can activate and I suggest you do not have sex until you recovery your health. Since men cannot be tested, you won't know if you are infectious or not. And the high risk strains do not have any symptoms.
After the surgery, lead a very healthy life. Exercise more, no cigs, less booze, more rest and more sleep, less stress, take vitamins, eat healthy, meditate, etc. A strong body and mind can reduce the chance of cancer or getting warts.