There are a few things that figure into it:
1. Time of day. Especially in working-class districts, most people aren't able to vote in-person until after ~5PM. Most employers do not give paid time off for voting, so people can't afford to do it during normal business hours. This can lead to a heavy rush and long lines in the evening. Conversely, if you can go in the morning or when most people are at work, lines may be short to non-existent.
2. Availability of early and/or mail voting. The easier and more convenient it is to vote early or by mail, the shorter lines will be on election day.
3. Lack of polling places.
This report is a bit dated, but it shows over 1000 polling places closed between 2012 and 2018, frequently in districts with a high percentage of black residents. Some counties in Georgia, which is where a lot of the images of very long lines came from, closed over 80% of their polling places. Several counties were reduced to just one polling place.