@soong Build AOSP,Flash AOSP
The AOSP master branch is Android 12.
This error usually means the build process was killed by the OS in your laptop due to having no RAM left. You can confirm by running dmesg after the error and seeing in kernel logs that your process got killed.
Solutions would be:
Run make with a smaller j value than you're currently using, or Get more RAM, or Add swap space ( disk part that will be used as virtual memory)