Build is failing for gatsby showing timeout without any error logs

There is a reason, and it’s even mentioned in log you’ve posted.

8:05:19 PM: Killed
8:05:22 PM: ERROR: “build:app” exited with 137.

^ That indicates that the build has run out of memory.

You can see the following support guides:
https://answers.netlify.com/t/support-guide-making-sure-your-builds-use-appropriate-resources-for-netlifys-build-system/5349
https://answers.netlify.com/t/support-guide-what-can-i-do-if-my-build-fails-for-memory-overallocation-related-errors/36549