Endogeneity can be associated to unobserved heterogeneity or two-way causality. You do not know the true model, so the discussion is mainly based on rethorical arguments.
There are some tests that allow approaching to this issue (Hausman-type test), based on comparing the estimates from models not considering endogeneity and the ones obtained dealing with endogeneity (e.g., using instrumental variables). These tests are not wideley accepted nowadays as they assume you are correcting endogeneity.
GMM is not accepted in many subfields (e.g., Labour Economics) as a convincing way of dealing with endogeneity. Overall, use FE with panel data. If you use a dynamic model, use some sort of GMM (Blundell-Bond, Arellano-Bond, etc.).
If you are writing some empirical work, I do not recommend you to directly use some specific tests. You need to understand your story, and try to explain endogeneities from the perspective of economics except for mathematics.
For when it is appropriate to use GMM, if you just want to use some simple instrumental variables, GMM and 2SLS are equivalent for just identification case, and GMM is more efficient for over identification case.
First of all, the research type and empirical tools play a crucial role here. If you're using a dynamic regression model use directly the GMM system or the GMM EGLS in case of multiple individuals in order to have solid results.
Generally, I would recommend this article : Article Explaining Fixed Effects: Random Effects Modeling of Time-Se...