In my case, the following command has resolved the issue:
softwareupdate --install
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: