I see a lot of posts about writing to the SD card, but I believe my problem is different. I am unable to create the SD card during the process of building an AVD.
I
For the people who faced the same issue on windows. For me it was because mksdcard.exe tool was unable to run successfully. Some SDK tools such as mksdcard.exe require Microsoft Visual C++ runtime. So go to your System properties and check your System type:
Then based on your system type,(for me it was x64) download/update the latest Microsoft Visual C++ Redistributable for Visual Studio 2019 from the link https://visualstudio.microsoft.com/downloads/
After installing Microsoft Visual C++, my problem was fixed. I was able to create AVD successfully.