Affect is to cause an effect on something.
Affect as verb - to cause a change in something ("the pandemic affected the economy").
Effect as verb - to bring something about ("the pandemic effected an economic downturn").
Affect as noun - the outward appearance of emotion ("her face showed a neutral affect").
Effect as noun - the result of a change ("the effect on the economy was devastating").
The second and especially the third meanings aren't seen all that often but they are still in use.