This was tried in many large cities in the 60s and 70s. The apartment buildings were ugly and generally became havens for gangs and crime. So.much so that most of them were eventually torn down. Cabrini Green is an example of this.
Building housing alone does not solve the issue. There is a massive support issue that also needs to be addressed. Jobs, child care, food, and so on.