This is the adult squash vine borer that lays it’s eggs at the base of your favorite summer and winter squash, zucchini, pumpkins and gourd plants. They hatch and eat their way inside the plant's stem where they are protected from predators. They live there for several weeks until they get large enough and do enough damage. Then one day your plant collapses and you are shocked. Preventative measures are needed where SVB is present to protect your squash crop. Here’s a link from K-State Research and Extension with detailed information about Squash Vine Borer. If you do preventative spraying at the base of the plant, Eight (permethrin) would be what I’d recommend.
https://hnr.k-state.edu/extension/info-center/common-pest-problems/common-pest-problem-new/Squash%20Vine%20Borer.pdf
Here is another link for those who want to follow strictly organic practices. https://articles.extension.org/pages/65684/biology-and-management-of-squash-vine-borer-in-organic-farming-systems
Note, scouting for the eggs regularly will be critical to your success.
https://hnr.k-state.edu/extension/info-center/common-pest-problems/common-pest-problem-new/Squash%20Vine%20Borer.pdf
Here is another link for those who want to follow strictly organic practices. https://articles.extension.org/pages/65684/biology-and-management-of-squash-vine-borer-in-organic-farming-systems
Note, scouting for the eggs regularly will be critical to your success.