Xcrun Error

I have been trying to compile c on vs code. I have all the extensions needed on vs code but now it is giving me an Xcrun error. I tried running $ xcode-select --install in the terminal , but it doesn't work. I tried updating my account by running chsh -s /bin/zsh. However it still doesn't work. Can anyone guid me further on how to do this?