Dynamical behavior of nonlinear wave solutions of the generalized Newell–Whitehead–Segel equation