In my case it was the Windows Defender policies of my company that prevented cargo from running.
I had to add the .cargo and .rustup directories in the Windows Defender exclusion list.