Your build went over the 11 GB memory limit:
You can try setting:
experimental: { cpus: 1 }
in your next.config.js to reduce memory usage.