In the first Act, Willy notices that the Elm trees of the past have been cut and made into apartment complexes, the people have changed, the population has increased, and he claims to feel trapped in a box. What it means actually is that change is engulfing society, and those (like Willy) who aren't willing to let go of their pasts, will be trapped by it. That is the metaphor.
Willy also describes it as:
WILLY: The way they boxed us in here. Bricks and windows, windows and bricks.
WILLY: The street is lined with cars. There’s not a breath of fresh air in the neighborhood. The grass don’t grow any more, you can’t raise a carrot in the back yard. They should’ve had a law against apartment houses. Remember those two beautiful elm trees out there? When I and Biff hung the swing between them?
LINDA: Yeah, like being a million miles from the city.
WILLY: They should’ve arrested the builder for cutting those down. They massacred the neighbourhood. (Lost.) More and more I think of those days, Linda. This time of year it was lilac and wisteria. And then the peonies would come out, and the daffodils. What fragrance in this room!
LINDA: Well, after all, people had to move somewhere.
WILLY: No, there’s more people now.
LINDA: I don’t think there’s more people. I think
WILLY: There’s more people! That’s what’s ruining this country! Population is getting out of control. The competition is maddening! Smell the stink from that apartment house! And another one on the other side...
So, in our own view, what Willy is seeing should be the norm: More people, more buildings, more improvements- plain change. However, for someone as tormented as he is, he is definitely losing control of himself, and of his life. That is the sad allegory in the story.