I landed myself a nice case of it after dropping out of school. I was isolated at home for a few years and that was enough to really unfamiliarize myself with the few places I was at least sort of comfortable going to, so nothing remained. It's partially tied to the high sensitivity and overstimulation part of autism as that definitely makes it worse, but in my case the actual origin is built on layers of bad experiences.
I'm lucky to not have too many reasons or desires to go outside, but it's still a rotten time when I do. Makes things 10 times more exhausting if you spend the whole duration battling anxiety so you end up with little to no energy for any other activity for the day. Such a waste of effort sometimes if it's for little things like a walk around the block or a quick doctor check up. Doesn't exactly help with wanting to do it when you know you'll likely be too tired for the rest of the day after.
So nowadays I only really go out for things I truly care about. Like travel or important health and legal reasons. Things that are worth losing a few days for.
On a more positive note, familiarization is possible and helps a lot in reducing the amount of fear and stress. A powerful element to bring along is another person that can take the lead for situations, acting as a buffer between you and the unpredictable. If there's a routine and it's the same place you always go and to do the same things, it gets easier too (provided nothing about it is too unpleasant, be it the people or activities there).
I also often try to position myself in less fully open spaces, like corners and walls and whatnot. Closing doors, curtains or blinds to isolate a space from the rest is of course very effective too.