Confused by 'Carrot is my favorite food' / "Carrots are my favorite food"

Solution 1:

Carrot, like most vegetables and food products generally, can be employed both as countable or as mass nouns.

Carrot is my favourite food (mass noun), referring to the 'flesh' of the carrot as a substance.

Carrots are my favourite food (countable noun) referring to individual roots.