Galerkin-type solution for the Moore–Gibson–Thompson thermoelasticity theory