Setting up docker on mack supposed to be straightforward however I was keep on getting errors

Docker exit code 137 implies Docker doesn’t have enough RAM to finish the work.

Unfortunately Docker consumes a lot of RAM.

Go to Docker Desktop app > Preferences > Resources > Advanced and increase the MEMORY - best to double it.