What is shown in TASM2 movie of Electro's storyline is Sony's fictional storyline. Today you are going to know the real origin of it.
(source:https://dailysuperheroes.com/movies/jamie-foxx-returning-as-electro-in-marvels-spider-man-3/)
ORIGIN OF ELECTRO
Electro's first appearance was in 1974's The Amazing Spiderman issue number 9 comic. Electro's real name is Maxwell Dillon. He is an electrician and works as a lineman in an electric company. One day he climbed an electric pillar to work. While working, he received an electric shock of a very large type and went straight to the ground from the top of the pillar. Nothing happened to him after seeing him from so high and even after such a big shock he is completely fine. Then he goes home, when he goes to an electric device, the current is active in his whole body and he sees something like lightning from the finger of his hand. Whenever he lifts his finger upwards, a lightning-like lightning comes out of his finger. Only then did he realize that his whole body had become electric after the shock. It makes him feel powerful and more powerful So he goes to a power plant a short distance from his home and absorbs all the power there. He then hijacked a STARK INDUSTRY van to become more powerful and from there took an Ark Reactor Device and made a costume for himself.
(source:https://bleedingcool.com/comics/the-silver-age-debut-of-electro-in-amazing-spider-man-9-at-auction/)
After a while, Electro comes to see Magneto and asks him to join Magneto's Brotherhood of Evil Mutants team, but Electo returns him. Electro then started robbing the bank by hiding his identity after the costumes. Then one day he attacked J. Jonah Jameson's Daily Bugle building and took all the money of his savings in front of Jameson. Jameson thinks it's Spiderman. So he called the electro Spiderman and published the news in the newspaper. After seeing this, Spiderman starts looking for electro to save his reputation, after finding it, he starts fighting with electro. But whenever Spiderman grabs the electro with his hand, he gets a very strong electric shock and that's where he becomes unconscious. There was a fan so he left without harming her.
(source:https://jimmacmain.wordpress.com/2015/08/27/spider-who-part-120-electro-proof-spider-man/)
Then Spider-Man comes fully formed. Wear rubber gloves, rubber shoes. This time he beats Electro very badly and pours water on Electro from a water tank, which causes a short circuit in Electro's body and leaves him unconscious. Become a hero and protect his reputation.
After Electro was released from prison, he attacked the Baxter Building wearing Electro's costumes again, but this time he was defeated by Daredevil. A few days later, Dr Octopus visits him and talks about his team, the sinister six, who have all been defeated by Spider-Man in one way or another. This time to take revenge on Spiderman, he agrees to Dr Octopus' offer and becomes a member of the sinister six.
(source:https://marvel.fandom.com/wiki/Maxwell_Dillon_%28Earth-616%29)
This was the true origin of ELECTRO. now I hope you will understand. Thanks for reading.