The document exceeds maximum allowed BSON object size after serialization

I found the header message, it is in the Post-processing section:

Header rule files are too large. Please reduce the combined size of /_headers and /netlify.toml

This seems similar to topic 1000738 but there is no direct solution posted there.