Topology is an essential part of creating 3D models. It is generally a rule of thumb that models should be created with all quads if the mesh is going to deform, such as with character meshes that will be animated. If a mesh is not going to deform, then it is reasonable for the mesh to contain some triangles and n-gons. Regardless of how the topology is formed, the game engine will convert the mesh to entirely triangles. However, to avoid irregularities or unexpected results, it is always a good idea to consistently use the same methods and clean topology. The Pushing Points Topology Workbook by William Vaughan is a great resource to learn how to correct common topology errors.

ArtStation - The Pushing Points Topology Workbook, William Vaughan

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0da1b52e-7604-4f94-b126-ba637e419323/PushingPoints.png

For more info on the application of topology in games (hard surface), watch the below video that covers ngons, triangles and quads.

https://youtu.be/sFSTfAOOZ9M