Black walnut and tomatoes are the classic pairing to avoid: walnut roots release juglone, which kills tomatoes, peppers, potatoes, and apples nearby. The toxic zone extends roughly 50 to 60 feet from the trunk. Fennel is another loner that stunts most vegetables planted close to it.
Other combinations fail for simpler reasons. Mint planted in a bed rather than a pot will overrun its neighbors within a season or two. Onions and garlic slow the growth of beans and peas. Tall sun lovers like corn or sunflowers shade out low crops on their north side, and two heavy feeders such as tomatoes and corn compete for the same nutrients in the same soil.
Spacing solves most of these conflicts. If you are laying out new beds, you can try arrangements on a photo of your own plot with AI garden design first.