I agree with @Gunjan Patel's answer that downgrading to a supported Node.js version is the right fix. While the small improvement to your package.json is that it’s safer to specify:
"engines": {
"node": "20.x"
}
Buildpacks only support a fixed set of Node versions, so sticking to a known compatible one (like 18.x or 20.x) is the most reliable option.