Are vacuums able to get rid of pet hair/dander?

Yes. Focus on vacuums that have hepa filtration and are recommended by the allergy website(s) aaaai or acaai.
No. Vacuuming alone is important, but not enough if you have a pet. Bathing the animal twice a week is often necessary to seriously reduce pet dander, and you should consider hard floors and hepa filters if you are unable to relocate the pet.