Molecular dynamics reveals formation path of benzonitrile and other molecules in conditions relevant to the interstellar medium