You can fix this issue by running the following steps.
Remove /Library/Developer
sudo rm -rf /Library/Developer
Download and install Xcode Command Line Tools for Xcode 14.2
https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_14.2/Command_Line_Tools_for_Xcode_14.2.dmg
Open Xcode 14.2 and let it install the renaming tools