The vaccine has recently gotten FDA approval for people up to age 45, so if you fall between 27 and 45, still talk to your doctor.
https://www.mskcc.org/news/think-you-re-too-old-get-hpv-vaccine-prevent-cancer-maybe-not
You would need to ask your doctor. There are numerous strains of HPV. Most clear on their own and are not anything to worry about. How old are you? Typically this is given during adolescence but they will give it up to 26 years of age. The reason why is that many have been exposed by that age and it makes it tougher for the vaccine to have an impact after that. You've already had hpv, you say. This is an article to read, https://www.mayoclinic.org/diseases-conditions/hpv-infection/in-depth/hpv-vaccine/art-20047292 It states that getting the HPV vaccine even if you have had hpv prior would be beneficial as there are so many strains, it would counter additional strains you could be exposed to. Your doctor would tell you if it is specifically safe for you but would imagine it is. Again, you need to be in the right age range though.