Electro comes from the name electronic music, and funk records have influenced electro music. Drum machines influence drum music electro. Drum music has paved the way for computers, which are now utilized for creating this type of music. Hip hop was a cultural movement.
The music came around because of the African American community's cultural movement, especially in New York or Brooklyn in the 1970s and 1980s. Rap may have come out in the 1970s, but it only became mainstream in the 1980s with such performers as RUN DMC, The Sugarhill Gang, LL Cool J, and Public Enemy with their infectious message to "Fight the Power." Hip-hop is immortalized by giants like Biggie Smalls and Tupac, who were both gunned down at the peak of their respective careers.
On the other hand, Electro became popular in the 1980s with Duran Duran and Eurythmics. It is difficult to determine precisely what electro music is except that it is very retro. The most prominent ingredient in electro music is the synthesizer. Synthesizers were frequently used in all different kinds of music in the 1980s, but it was used primarily in electro music. An essential part of hip-hop music is the lyrics. Hip hop is like poetry, with a significant lean into social issues of the day.