Affect is the action, effect the result.
He was affected by her shouting. The effect was to make him timid.
How have you been affected by the lockdown? The effect has been boredom.
Affect and effect are easy to mix up. Here's the short version of how to use affect vs. effect. Affect is usually a verb, and it means to impact or change. Effect is usually a noun, an effect is the result of a change.
Grammarly › blog › affect-vs-effect
Affect vs. Effect Difference–It's Not As Hard As You Think | Grammarly