Marvel movies are probably more diverse than Hollywood as a whole.
There's several black characters. They did Black Panther, Shang Chi, and they just did a series with a Pakistani Muslim hero.
They've cast plenty of black actors. Hell even TI got a recurring role
Those movies came after, and they're not part of the Avengers (yet)