>>156539Swarming beetles are a menace to a vegetable garden and really hard to control. I mostly depend on the birds in my garden, but they can't do much more than damage control. I rarely do so, but beetles are one of the exceptions I use pesticides for. I prefer pyrethrins; they're very effective but short-lived, so the chance of you killing insects other than the ones you targeted is fairly low and you can already consume your produce safely after only one sunny day. Don't confuse it with permethrin through; the synthetic derivative. It breaks down much more slowly, which means you don't have to spray as frequent, but will have to wait longer before you can consume your produce and you'll risk more ecological damage to the insect fauna in your garden. Google is your friend.
Pic related; these have been swarming by the hundreds every spring the last few years.