Galactic chemical evolution plays a crucial role in planet formation