Uncovering the electrochemical mechanisms for hydrogen evolution reaction of heteroatom doped M2C MXene (M = Ti, Mo)