It helps to be able to recognize the beneficial insects and plant insectary plants to atttract them. If you have an army of good bugs around, do not spray, just give them a chance.
The best thing you can do for your plants is give them a healthy start. Prepare the soil well, rotate crops if you have had problems, plant at the right time and make sure the plants get enough food, water, air and light. Cull weak plants, they are magnets for pests.
This is a link to identifying the good bugs
https://www.ext.colostate.edu/pubs/insect/05550.html
This is a link to identifying common pests of curcubits. I myself have stopped using sevin for the most part, because it will definitely kill the good bugs faster than the bad ones and it is harmful to bees. Instead I use netting to exclude bugs. Newspaper tubes can protect the fruit. Alcohol and insecticidal soap on soft bodied insects like aphids, and mealybugs. I plant corn to attract the mealy bug destroyer that loves white flies too. Water works to blast bugs off white flies and hand picking of beetles, slugs and snails. A toad eat lots of snail and slugs otherwise use slug and snail bait.
I have flowering plants to provide nectar for bees and beneficial insects. Lavender, marigolds, nasturtiums, and alyssum are beautiful and beneficial.
The work horse of the garden as far as pest patrol for me is fennel. It acts as a trap plant for aphids but it is not really bothered by them. The aphids on the fennel feed the larvae of the lady beetles and the flower heads provide nectar and attract lady bugs, parasitic wasps, hover flies and lace wings and I haven't had a problem with aphids for three years now. The only thing is that the fennel needs to be planted in its own corner of the yard and you only need one plant. It does not like company. I have found that gingers, maranta, horseradish, gynuura are o.k. next to it. They are either not bothered by pests or attract a different kind of aphid. fennel can be kept in a pot on a patio or at least 10 ft from other plants.
https://www.clemson.edu/extension/hgic/p ... c2207.html