In my experience, when I had regular or constant anxiety, the nicotine crave blended with it but smoking calmed both. It is very possible that a non-nicotine method of relaxation would have also worked on both, but those are rarer and/or less quick and convenient.
That was one of the appeals of smoking.