The building blocks of life can form rapidly around young stars