This looks like it could fit pretty well into this long-running thread:
Although to be fair, you’re asking the question from the opposite POV.
Trying to answer the narrow question of “how do they find anything?”, that starts with knowing what they are looking for. You can’t find “aspirin” in the OTC section if you don’t know that’s what it’s called. You also can’t find “ampicillin” in the pharmacy part if you don’t know that’s what you want.
Within any pharmacy, there is some organization to “all those pills on all those shelves”. Any post-apocalyptic scavenger only needs to learn that once. Maybe it’s alpha by drug name. Maybe it’s categorical. Heck, there may be section tags we just don’t see from our usual spot on the opposite side of the counter. I know I don’t know how pharmacies are arranged, but I’m darn confident there is a logical arrangement that even a layman could learn to follow. Once they know the name and general category of what they are looking for.
Setting aside of course the giant artificiality that every pharmacy in the land will have been turned inside out by looters and drug-seekers in the opening hours of the apocalypse. Finding an unstaffed but nonetheless nearly virginal pharmacy simply isn’t going to happen. Which is another way this scene fits the thread I cited.
Which thread could have been titled “Hollywood’s unreal but omnipresent tropes”