How do I add attributes to an entity reference field? Let's say we have a RECIPE content type that has a multi-value entity reference field to a FOOD content type, so as to represent the ingredients.

Each ingredient on a recipe needs to hold a quantity (eg: '1 cup') in addition to the reference itself.  How can we add that attribute?

We'd like to avoid having an additional entity to hold the relationship for performance reasons.  Also, sticking to core's entity reference field seems a good idea so the rest of the ecosystem can recognize the relationship.
The best and standard way to do this is with paragraphs.

Enable the paragraphs module, then add a paragraph type called ingredient with the two fields, an entity reference field and a field for the quantity.

if you want an ingredient to be reusable, keep in mind that paragraphs are not reusable.  If you want to reuse an ingredient, say "1 cup flour", then you could use an entity reference field to another reusable entity type, such as media or taxonomy, or another node type.