Quick answer: Cosmos works best beside vegetable beds rather than wedged among crowded vegetable stems.
Cosmos can produce flowers through an extended season when its light, water and temperature needs are met.
A cosmos flower can provide nectar or pollen to visiting insects, depending on the cultivar and flower stage.
Tomatoes often grow on cages or trellises and need regular tying, pruning or disease checks.
Peppers and eggplant prefer warm sunny conditions.
Squash and cucumbers produce flowers visited by bees, but their leaves and vines can spread widely.
A flower that attracts beneficial insects is not the same as a scientifically validated repellent.
Step-by-step advice, charts and free garden calculators at Garden Voila.