Preprojective cohomological Hall algebras and Yangians