Would it change the meaning of the context if I say "affect" instead of "infect" in this situation?

Native speaker’s answer
Rebecca
Yes, it would change the meaning ever so slightly! "Infected" is more specific than "affected". If something is "infected" it means that a virus caused an infection, like a disease. "Affected" means that something was influenced or changed by something else. So, technically you could say "The broccoli was affected by an infection". But here, we see that the broccoli was "infected" with spores that were kinda like viruses. Ex: The weather affected how the harvest grew this season. Ex: The harvest was infected with some kind of disease. So we couldn't use any of the crops.