We can reduce the installation footprint of Visual Studio on your system drive by changing the location of some of its files like use a different location for the download cache and shared components, tools, and SDKs, but there are some tools and SDKs that have different rules on where they can be installed. Such tools and SDKs are installed on your system drive even if you choose another location, please check this official document: Select the installation locations in Visual Studio, it is recommended to free up disk space on your existing C drive or replace it with a larger drive.
I found a suggestion: Install everything of VS on another drive on our Developer Community. Please kindly vote and others shared a workaround about create a virtual machine.