Last year, when I was planning my first potato bed, I asked about companion plants.
Chris Kottt mentioned that he uses marigolds, horseradish, and garlic
https://permies.com/t/70572/Permie-potato-beds#590668
To this I added horseradish, which I have heard smells like sadness and death to potato predators, and garlic, because, well, garlic, as well as some French marigolds.
and,
I have read that horseradish is the best pest-deterrent for potato pests of all sizes, and that yields of each crop increase if they are companion planted. Also, I love garlic, but I honestly think that if you need pest deterrence, find the smelliest allium variety you can use. And I use French marigolds everywhere because of their strong insecticidal properties, but I tend to keep them to the perimeters and switch to weaker varieties if I notice a drop in the worm population (French and African(I think) marigolds are so toxic to some soil biota that you can overdo it, so be aware).
I haven't tried the horseradish yet, nor the garlic (as I didn't have any), but I did try some onion starts. They didn't seem to care for being with the potatoes, and often got burried by my hilling up with mulch, even though I tried to be careful.
I'm thinking that whether or not garlic does well with potatoes depends on how you plant the potatoes. If you're hilling them up two feet like I did, the garlic might not care for that. TJ Jefferson also mentioned in my
thread that his garlic doesn't seem to do well in
wood chip mulch. I haven't grown normal garlic sucessfully, but the only time I've had sucess with elephant garlic (a type of leek) was when I planted it with lots of aged woodchips...which is also how my mom grows hers, and hers grow really well. So, whether or not the garlic does well with potatoes might depend on the type of garlic, as well as how you grow your potatoes.