Microscopic insights into the catalytic mechanisms of monolayer MoS2 and its heterostructures in hydrogen evolution reaction