Affected can be used as a past tense verb that means influenced or changed. It can also be used as an adjective to refer to a noun that has been affected (the affected body part).
Effected is a past tense verb that means brought about or achieved.
https://prowritingaid.com/grammar/1000196/Effected-vs-affected%E2%80%94what-is-the-difference