We can talk specifically about bicycles. You don't need to buy one and lock it outside. You can get a Lyft Bike membership which would probably come out to about $5 per daily 4-mile commute on an e-bike, and much less if you qualify for their low-income program. And you're constantly within a couple blocks at most of one of those bikes.
There's also Revel scooters if you need more power and space for groceries, Lime scooters if you like getting injured, and there are plenty of tiny electric vehicles now that you can buy, wouldn't call a bicycle but can easily be brought into grocery stores etc. They're all over SF. I don't think it's exactly out of place to call out alternatives when discussing whether biking is a viable commuting option.