Robot vacuums are good enough for daily touch-ups, but they won't replace an upright for deep cleaning pet hair.
Robot vacuums handle surface pet hair surprisingly well — the Roomba j7+ or Roborock S8 models do a decent job on hardwood and low-pile carpet if you run them daily. But they struggle with embedded hair in medium-to-high pile carpets, especially from long-haired dogs or cats. You’ll still need a good upright (something like a Miele or a Dyson V15) for a proper weekly deep clean.
The real win with a robot vacuum is consistency. A robot running every day keeps hair from building up, meaning less work for you with the upright. But if you only have one vacuum and you have a heavy-shedding pet, get the traditional upright. Robots also choke on large clumps, tend to get tangled in long hair, and can’t do stairs or tight corners as well.
I’d say: buy both if you can afford it, but if you’re picking one, the upright wins for pet owners. The robot is a helper, not a hero.
Your floors will be happier with a robot running daily and an upright on weekends.