There was a carpet scraper trend going on TikTok at one point with these small hand tools that supposedly are incredible at pulling up pet hair (I think most people found it really satisfying). Here's a cheap one on Amazon to give you an idea.
Lots of people complain about them damaging clothes, furniture, and other upholstered items, but for standard carpet, it would probably work fine. You could also use a rubber carpet rake as another person suggested. They usually double as a squeegee to give you some more utility around the house too.