If the model describing the regression is deterministic ( not probabilistic), least squares method is to be selected and to be applied .
On the other hand, if the model describing the regression is not deterministic but not probabilistic, method of moments is to be selected and to be applied.
Of course, under reasonable assumptions of the errors involved in data , method of moments can be selected and can be applied even if the model describing the regression is deterministic one.
2SLS is a method to cure endogeneity in regression model. On the other hand, GMM also covers this problem with minimum standard error. GMM also does not required any stationary analysis of variables.
To be specific both the methods solve the endogeneity problem, however the difference lies in the incorporation of instruments. While the 2SLS use only the lagged levels as the possible instruments, the GMM applies complete exogenous, lagged differences and lagged levels as the instruments.