Check the current sdk xcrun --show-sdk-path

Change sdk

Using CommandLineTools SDK sudo xcode-select -s /Library/Developer/CommandLineTools

Using XCode.app SDK sudo xcode-select -s /Applications/Xcode.app/Contents/Developer