You can also use any external service for optimizing images if you prefer not to use the built-in WebAssembly solution (which uses Squoosh (https://squoosh.app/). This was announced with the 10.1 blog post: https://nextjs.org/blog/next-10-1#nextimage-improvements
Specific PR improving memory usage: https://github.com/vercel/next.js/pull/23565
Let us know if you're still seeing this issue after updating to 10.2 on the issue linked. Thanks!
This issue is a blocker for several people, including myself, and there hasn't been any team response on GitHub yet: https://github.com/vercel/next.js/issues/23637