There's not enough information around the error to figure out what's wrong; from the inference, it's a chicken before the egg issue, where .NET8 executable doesn't exist but it's trying to download it with the dotnet executable -- but the bubbled-up messages don't give any context.
Close VSCode (entirely), install .NET8 on your machine, and re-try opening VSCode.