This is very important to keep crops healthy. Traditionally, crops are divided into four types:
Legumes
French beans, peas, runner beans, broad beans
Root vegetables
radish, carrot, potato, onion, garlic, beetroot, swede, sweet potato, shallots
Brassicas
spinach, chard, kale, cabbage, cauliflower, broccoli, spinach
Fruit-bearing
tomato, sweetcorn, cucumber, squash, pumpkin, courgette, aubergine
Just make sure you move them around every year with your planting plan, so the same type of crop isn’t in the same place year after year.