What Philip said. (hey Philip!)
Vine borers are the larvae stage of a moth. The moth flies in and lays eggs around the base of the stem. Eggs hatch and the larvae drill into the stem. Boom! Dead or soon-to-be-dead plants. Most summer squash has hollow stems...the SVB can easily drill in and tunnel through these vines. Philip suggested winter squash which pretty well all have solid stems thus making it more difficult or impossible for the borers to enter the stems, much less tunnel through them. Planting in a container really won't help being as the adult moth will simply fly to your potted vines.
The moth kind of look like a wasp.
https://www.almanac.com/pest/s...