Good short article on the concept of companion planting and a list of a few groups which grow better next to each other.
https://oldworldgardenfarms.com/2017/03/31/garden-companion-plants/Conversely there are antagonist relations between plants which do NOT like to grow together.
If you have a small garden space, this is vital information. You can still plant antagonists but use a buffer of compatible plants.