The closest I came to SHTF situations were the Seattle riots in 1999 and Kincade Fire evacuation in 2019.
In 1999 I and a few coworkers were trapped in our offices in the Westin Building for two days while the rioters and police raged back and forth below us.
When we ventured out, almost everything was closed. My car was locked in the parking garage with no attendants present, and we had to search a few city blocks to find a store that was open (a liquor store -- we bought snacks and brought them back to the group so we could eat while discussing what we'd seen and what to do next). The buses were not running, and I had to hoof it about a mile south before I could find one.
Ever since that experience, I've always kept one of my office desk drawers full of food.
In 2019 we evacuated to a friend's house in East Bay (actually turned out to be a friend-of-a-friend's house, which our friend volunteered without asking permission, upsetting the actual owner a bit). Unlike in Seattle, it was business as usual despite the fires and pseudo-refugees (like ourselves), and we were able to buy food and other things.
In short, yeah, what others have already said -- it depends on the exact form of SHTF, but it has to get pretty bad before food becomes unavailable, and even then the impact might have a small footprint, outside which it's business as usual.
As for a scenario where all of western civilization collapses and food stops getting trucked into the cities, I expect shopping would be dangerous for a short time, and then all the food would be gone. The urbanites would need to leave or die.
Out here in the sticks, I would hope the farmers market would continue to operate so local farmers could sell their produce. Even if it didn't, we'd ramp up our garden and chicken flock anyway, and I'd look for some way to trade with other local producers. It's nice to live where the food comes from, but without some way to trade it would be hard to keep a diverse diet.