The other grocer in our neighbordhood does deliveries. Go shopping as you normally do, at checkout groceries are loaded into a big plastic tote instead of a grocery bag. It's delivered to your door within the hour.
I grew up outside the cities (denser, working class suburbs, not mcmansion-style suburbs) and after city living most of my adult life I can't realistically go back.
Or you buy your own cart, you see them all over in NYC, for groceries and laundry.
Invariably, I forget something so I usually have a smaller midweek trip for things I forgot. The walk to Trader Joe's is about 20min each way.
Edit: more like a 20min walk; not 30.
You just run over to get some things for dinner or for a couple of days. You can fit a surprising amount of food in a single grocery bag.
The walk to my grocery store is under 5 minutes. I shop every other day because I can shop before 7AM. But if I had to shop later than 7AM, I would only go once a week, because the lines grow too long.
NYC is the only place I've seen bouncers outside of grocery stores to control the entrance (I'm looking at you 72 street Trader Joe's).
I've never lived in a dense city so I don't know how this is done.
I doubt I could carry a week of groceries for my modest family (2 adults, 2 children) 1 block, let alone several. Do you maybe use personal carts or what?