this is exactly it. I've suffered from anxiety and pretty much the best way to get over it is to do the thing that scares you, and then do it again, and then again. Whereas, conversely, if you avoid it, it becomes a huge thing in your head. Your brain thinks "well, you thought something bad might happen if you do X, so you didn't do it and nothing bad happened, therefore that PROVES not doing it is 'safe', you should keep not doing it."
Whereas if you do it, the first time you'll get "Weeelll okay nothing bad happened this time, but it still might the next time!" but you ignore that, and do it again, and your brain makes the link "Okay, we've done it twice perhaps it's not actually that bad, but I'm still cautious..." then after a few times it's "Actually nothing bad (or at least nothing we can't handle, has happened, so doing X is safe!"
If you're lucky, you might even get a "actually, nothing bad happened and I really enjoyed myself/in fact something good happened/I had a rush of endorphins/felt really proud of myself for doing it!" to help the "re-programming" along.
obviously it's not always 'that easy' (although the first few times you do it it isn't easy at all!), sometimes people with very severe anxiety will also need medication, therapy etc. - but most people can usually do something themselves to stop it before it becomes that bad.
One of my things was driving places I didn't know, alone. It was starting to affect my life, I missed a job interview because of it, etc.
So I tried to get practice driving new places with someone else in the car.
Then I went somewhere where it was completely optional, I had no time limits, etc, to make it as stress free as possible. Double checked I had the route downloaded, a map back up, water etc in the car, breakdown service details, etc.
Then I did it again, and again.
The first time I was terrified, didn't sleep at all the night before, couldn't eat before I got in the car, etc. But I did it. The second time I was still nervous. But it was fine. Now I jump in the car without thinking and drive anywhere.