it’s learned
Aside from rare cases where someone's brain is born structurally different (like psychopaths) and it affects their moral choices, "evil" is learned.
According to Crime Traveler (https://www.crimetraveller.org/2015/07/serial-killers-childhood-abuse/), of a certain serial killer study group, 68% reported at least one kind of childhood abuse, compared to the 12.5% of children that are abused in total (https://www.npr.org/sections/health-shots/2014/06/02/318227196/odds-of-abuse-and-mistreatment-add-up-over-childrens-lives). This implies that most serial killers' actions were affected by childhood abuse, which means their environment impacted them. (Of course, environment is no excuse, and most abuse survivors don't commit terrible crimes.)
I recently watched a TEDx Talks video about someone who almost became a school shooter. He said that his family was very aggressive and his parents were drug addicts who abused him. He had to move frequently, was always the new kid, and was always subject to bullies. He got kicked out of his house and was homeless for years. Eventually, he bought a gun and planned to shoot either a school or a mall, because he had nothing left to lose. However, his best friend—whom he had lied to and stolen from—still treated him like a person, and he decided against using his gun because of that one friend who treated him like a friend. He now is happily married and has four kids. If this doesn't show that someone from even the most "evil" parents about to do the most evil things can learn, I don't know what does.
In the vast majority of cases, evil is learned (meaning there's no excuse, but also meaning most people can change).