This has been written about broadly by social historians. This book, in particular, is illuminating: https://press.princeton.edu/books/paperback/9780691133867/wh...
Some other links:
https://news.iu.edu/live/news/24906-research-ties-persistenc...
https://www.apa.org/news/press/releases/2021/10/white-flight...
https://psmag.com/news/ghosts-of-white-people-past-witnessin...
There's also this rather infamous quote by one of the most powerful Republican strategists in the 80s, Lee Atwater: https://en.wikipedia.org/wiki/Lee_Atwater#:~:text=Later%20in...
I won't quote it here but it's very telling.
The Color of Law by Richard Rothstein is another good source on the topic, covering how racist governmental polices played a role.